Skip to content

Commit ac0e1fe

Browse files
committed
Jira: ArchiveIssue: option to disable email notification
1 parent c51b9df commit ac0e1fe

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

atlassian/jira.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,15 +1160,20 @@ def issue_get_worklog(self, issue_id_or_key):
11601160

11611161
return self.get(url)
11621162

1163-
def issue_archive(self, issue_id_or_key):
1163+
def issue_archive(self, issue_id_or_key, notify_users=None):
11641164
"""
11651165
Archives an issue.
11661166
:param issue_id_or_key: Issue id or issue key
1167+
:param notify_users: shall users be notified by Jira about archival?
1168+
The default value of None will apply the default behavior of Jira
11671169
:return:
11681170
"""
1171+
params = {}
1172+
if notify_users is not None:
1173+
params["notifyUsers"] = notify_users
11691174
base_url = self.resource_url("issue")
11701175
url = "{base_url}/{issueIdOrKey}/archive".format(base_url=base_url, issueIdOrKey=issue_id_or_key)
1171-
return self.put(url)
1176+
return self.put(url, params=params)
11721177

11731178
def issue_restore(self, issue_id_or_key):
11741179
"""

0 commit comments

Comments
 (0)