transition via jira-python

Hi, I'm trying to update the status from an issue via a python script. The Code looks like this:

issue = jira.issue('Issue ID')
jira.transition_issue(issue.key, '51')

 

There are no errors, but the status remains the same. Am I missing something in the transition_issue command? Or do I need to be an admin to do this operation?

Using the JIRA interface, it works, only the script doesn't.

 

3 answers

1 accepted

1 vote
Accepted answer

The status update didn't work, because some fields needed to be filled with information to allow the update (They were also required in the JIRA interface).

so the code had to look like this:

 

issue = jira.issue('Issue ID')
jira.transition_issue(issue.key, '51', customfield1 = 'some text', customfield2 = 'some text' , ... )

I am unable to use jira-python to merge tickets:

for t in transitions: if(t['name']=='Merge Ticket'): authed_jira.transition_issue(ticket, t['id'])

returns error: response text = {"errorMessages":[],"errors":{"issuelinks":"Please add the ticket you would like this ticket to merge with."}}

but when I specify the second ticket in the transition call it always refuses the ticket.: errors":{"issuelinks":"Field does not support update 'issuelinks'"}

Is '51' allowed transition for the project?

yes, executing issue = jira.issue('Issue Id).key transitions = jira.transitions(issue) for t in transitions: print(t['id'], t['name']) returns: 51 Resolve Issue

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Friday in Agile

Are you a Jira Service Desk agent? We want to talk to you!

Are you a whiz at handling tickets and looking at how you can further optimize your workflow with automation? Do you tackle detailed customer support questions while simultaneously getting flooded wi...

85 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you