atlassian-python-api icon indicating copy to clipboard operation
atlassian-python-api copied to clipboard

jira.assign_issue() Parameter error

Open mumuyu66 opened this issue 1 year ago • 0 comments

When I run jira.assign_issue('issue_id', account_id="account_id"), it reportsrequests.exceptions.HTTPError: 'accountId' must be the only user in GDPR strict mode that can recognize query parameters error

I read the code and think data = {"name": account_id} should be changed to data = {"accountId": account_id}? The modified code is:

 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 account_id: the account ID of the user to assign the issue to;
                for jira server the value for account_id should be a valid jira username
        :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 = {"accountId": account_id}
        return self.put(url, data=data)

mumuyu66 avatar Aug 04 '22 09:08 mumuyu66