Skip to content

[JIRA] Update issue_archive method to match the current api #893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2021
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
11 changes: 2 additions & 9 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,22 +805,15 @@ def issue_get_worklog(self, issue_id_or_key):

return self.get(url)

def issue_archive(self, issue_id_or_key, notify_users=False):
def issue_archive(self, issue_id_or_key):
"""
Archives an issue.
:param issue_id_or_key: Issue id or issue key
:param notify_users: send the email with notification that the issue was updated to users that watch it.
Admin or project admin permissions are required to disable the notification.
:return:
"""
params = {}
if notify_users:
params["notifyUsers"] = "true"
else:
params["notifyUsers"] = "false"
base_url = self.resource_url("issue")
url = "{base_url}/{issueIdOrKey}/archive".format(base_url=base_url, issueIdOrKey=issue_id_or_key)
return self.get(url)
return self.put(url)

def issue_field_value(self, key, field):
base_url = self.resource_url("issue")
Expand Down