It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
Answer accepted

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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published Thursday in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

97 views 0 10
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