Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def get_attachments_ids_from_issue(self, issue: T_id) -> List[Dict[str, str]]:
:param issue: str : jira issue key
:return: list of integers attachment IDs
"""
issue_id = self.get_issue(issue)["fields"]["attachment"]
issue_id = self.get_issue(issue, fields="attachment")["fields"]["attachment"]
list_attachments_id = []
for attachment in issue_id:
list_attachments_id.append({"filename": attachment["filename"], "attachment_id": attachment["id"]})
Expand Down Expand Up @@ -1833,7 +1833,7 @@ def scrap_regex_from_issue(self, issue: str, regex: str):
list: A list of matches.
"""
regex_output = []
issue_output = self.get_issue(issue)
issue_output = self.get_issue(issue, fields="description,comment")
description = issue_output["fields"]["description"]
comments = issue_output["fields"]["comment"]["comments"]

Expand Down Expand Up @@ -1903,7 +1903,7 @@ def get_issue_tree_recursive(self, issue_key: str, tree: Optional[list] = None,
# Check the recursion depth. In case of any bugs that would result in infinite recursion, this will prevent the function from crashing your app. Python default for REcursionError is 1000
if depth > 150:
raise Exception("Recursion depth exceeded")
issue = self.get_issue(issue_key)
issue = self.get_issue(issue_key, fields="issuelinks,subtasks")
issue_links = issue["fields"]["issuelinks"]
subtasks = issue["fields"]["subtasks"]
for issue_link in issue_links:
Expand Down Expand Up @@ -2056,7 +2056,7 @@ def set_issue_status(

def get_issue_status_changelog(self, issue_id: T_id):
# Get the issue details with changelog
response_get_issue = self.get_issue(issue_id, expand="changelog")
response_get_issue = self.get_issue(issue_id, fields="id", expand="changelog")
status_change_history = []
for history in response_get_issue["changelog"]["histories"]:
for item in history["items"]:
Expand Down
Loading