Kindly have a look at the following example
hello @Alexey Matveev ,
I can get the issue status by:
print("get_issue_status ISSUE-298 = ", jira.get_issue_status('ISSUE-298'))
get_issue_status ISSUE-298 = Waiting for Approval
However, I cannot set issue status with below command:
print("set_issue_status = ", jira.set_issue_status('ISSUE-298', 'Approve'))
The error was:
requests.exceptions.HTTPError: 400 Client Error: 400 for url: https://jira.company.eu/rest/api/2/issue/ISSUE-298/transitions
What was wrong with the set_issue_status command above?
The checked REST API's github site for the command definition:
def set_issue_status(self, issue_key, status_name, fields=None, update=None):
"""
Setting status by status_name. fields defaults to None for transitions without mandatory fields.
If there are mandatory fields for the transition, these can be set using a dict in 'fields'.
For updating screen properties that cannot be set/updated via the fields properties,
they can set using a dict through 'update'
Example:
jira.set_issue_status('MY-123','Resolved',{'myfield': 'myvalue'},
{"comment": [{"add": { "body": "Issue Comments"}}]})
Note that:
jira.issue_add_comment("ISSUE-298", "Add comment")
jira.get_issue_status('ISSUE-298')
jira.get_issue_status_id('ISSUE-298')
jira.get_issue_transitions('ISSUE-298')
jira.get_issue_transitions_full('ISSUE-298')
jira.set_issue_status('ISSUE-298', 'Approve')
jira.issue_transition('ISSUE-298', 'Approve')
jira.set_issue_status_by_transition_id('ISSUE-298', 11601)
Seems that I can only get the info from the system, and cannot set anything except adding a comment as of now. On the MS Edge, however, I have permission for this ISSUE-298 (permitted to set issue status of course).
Regards,
LHC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.