Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 3 additions & 0 deletions docs/jira.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down