Skip to content

Commit

Permalink
hotfix get_issue_tree_recursive
Browse files Browse the repository at this point in the history
  • Loading branch information
gkowalc committed Mar 20, 2024
1 parent 20cae0b commit 26cf691
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -1730,15 +1730,15 @@ def get_issue_tree_recursive(self, issue_key, tree=[], depth=0):
x for x in tree if issue_link["inwardIssue"]["key"] in x.keys()
]: # condition to avoid infinite recursion
tree.append({parent_issue_key: issue_link["inwardIssue"]["key"]})
self.get_issue_tree(
self.get_issue_tree_recursive(
issue_link["inwardIssue"]["key"], tree, depth + 1
) # recursive call of the function
for subtask in subtasks:
if subtask.get("key") is not None:
parent_issue_key = issue["key"]
if not [x for x in tree if subtask["key"] in x.keys()]: # condition to avoid infinite recursion
tree.append({parent_issue_key: subtask["key"]})
self.get_issue_tree(subtask["key"], tree, depth + 1) # recursive call of the function
self.get_issue_tree_recursive(subtask["key"], tree, depth + 1) # recursive call of the function
return tree

def create_or_update_issue_remote_links(
Expand Down

0 comments on commit 26cf691

Please sign in to comment.