From ac0e1fe3fa612941a383e51ab527d95236108232 Mon Sep 17 00:00:00 2001 From: Gonchik Tsymzhitov Date: Tue, 23 Jan 2024 09:59:40 +0200 Subject: [PATCH] Jira: ArchiveIssue: option to disable email notification --- atlassian/jira.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/atlassian/jira.py b/atlassian/jira.py index 96362606a..88c2d3753 100644 --- a/atlassian/jira.py +++ b/atlassian/jira.py @@ -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): """