Skip to content

Commit

Permalink
Jira: ArchiveIssue: option to disable email notification
Browse files Browse the repository at this point in the history
  • Loading branch information
gonchik committed Jan 23, 2024
1 parent c51b9df commit ac0e1fe
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -1160,15 +1160,20 @@ def issue_get_worklog(self, issue_id_or_key):

return self.get(url)

def issue_archive(self, issue_id_or_key):
def issue_archive(self, issue_id_or_key, notify_users=None):
"""
Archives an issue.
:param issue_id_or_key: Issue id or issue key
:param notify_users: shall users be notified by Jira about archival?
The default value of None will apply the default behavior of Jira
:return:
"""
params = {}
if notify_users is not None:
params["notifyUsers"] = notify_users
base_url = self.resource_url("issue")
url = "{base_url}/{issueIdOrKey}/archive".format(base_url=base_url, issueIdOrKey=issue_id_or_key)
return self.put(url)
return self.put(url, params=params)

def issue_restore(self, issue_id_or_key):
"""
Expand Down

0 comments on commit ac0e1fe

Please sign in to comment.