From e2d8ba366e53126b2231722e0cd319fcf1ca1a39 Mon Sep 17 00:00:00 2001 From: Sebastian Olsson Date: Wed, 9 Jun 2021 16:12:57 +0200 Subject: [PATCH 1/2] Jira: Update assign_issue to match the current API --- atlassian/jira.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/atlassian/jira.py b/atlassian/jira.py index 24e41017d..472824924 100644 --- a/atlassian/jira.py +++ b/atlassian/jira.py @@ -963,17 +963,17 @@ def issue_add_watcher(self, issue_key, user): data=data, ) - def assign_issue(self, issue, assignee=None): + def assign_issue(self, issue, account_id=None): """Assign an issue to a user. None will set it to unassigned. -1 will set it to Automatic. :param issue: the issue ID or key to assign :type issue: int or str - :param assignee: the user to assign the issue to - :type assignee: str + :param account_id: the account ID of the user to assign the issue to + :type account_id: str :rtype: bool """ base_url = self.resource_url("issue") url = "{base_url}/{issue}/assignee".format(base_url=base_url, issue=issue) - data = {"name": assignee} + data = {"accountId": account_id} return self.put(url, data=data) def create_issue(self, fields, update_history=False, update=None): From a70a812c933da02286082138043ac4aa430faa8f Mon Sep 17 00:00:00 2001 From: Sebastian Olsson Date: Wed, 9 Jun 2021 16:23:16 +0200 Subject: [PATCH 2/2] Jira: Document assign_issue in markdown docs --- docs/jira.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/jira.rst b/docs/jira.rst index 430048688..85448b0ad 100644 --- a/docs/jira.rst +++ b/docs/jira.rst @@ -168,6 +168,9 @@ Manage issues # Update issue jira.issue_update(issue_key, fields) + # Assign issue to user + jira.assign_issue(issue_key, account_id) + # Create issue jira.issue_create(fields)