def _do(self, _k, query, item): search = DoSearch(self.ctx) parent = item.parent.parent i_ = item.parent.index(item) key = parent["key"] q = '(issue in linkedIssues(%s) or "Epic Link" = %s or parent = %s)' % (key, key, key) if query: q = "%s AND %s" % (q, query) for j, data in search._search(q): item.parent.insert(i_ + 2 + j, sdict(data.items())) item.parent.remove(item)
def __call__(self, item): """Expands a node which declares a search. """ if 'search' not in item: return if item.get('complete'): return item.apply('complete', True) i_ = item.parent.index(item) for j, data in self._search(item['search']): item.parent.insert(i_ + 2 + j, sdict(data.items()))
def __call__(self, item): """Expands a node which declares a search. """ if "search" not in item: return if item.get("complete"): return item.apply("complete", True) i_ = item.parent.index(item) for j, data in self._search(item["search"]): item.parent.insert(i_ + 2 + j, sdict(data.items()))
def _do(self, _k, query, item): search = DoSearch(self.ctx) parent = item.parent.parent i_ = item.parent.index(item) key = parent['key'] q = "(issue in linkedIssues(%s) or \"Epic Link\" = %s or parent in tempoEpicIssues(%s) or parent = %s)" % ( key, key, key, key) if query: q = "%s AND %s" % (q, query) for j, data in search._search(q): item.parent.insert(i_ + 2 + j, sdict(data.items())) item.parent.remove(item)