transition_issue in jira-python failing with TypeError: transition_issue() takes at least 3 arguments (2 given)

HI,

the code snippet below was previously working, but now is failing with the shown error. I have no idea how to trouble shoot this error since as far as I can tell all required parameters have been passed to the routine:

*** CODE ****

kpi_measurements = jira.search_issues(search_query, maxResults = 500)
kpi_hash = {}
for each_kpi in kpi_measurements:
kpi_hash[each_kpi.fields.customfield_12006] = each_kpi #customfield_12006 is the key of a support project ticket

 # Use the key of the support project ticket to locate the corresponding kpi ticket in the hash table
kpi=kpi_hash.get_key(key)

# If the status of the kpi ticket is not aligned with the status of the support project ticket, transition the kpi ticket
jira.transition_issue(kpi, transitionId=41) 

 

**** ERROR *****

jira.transition_issue(kpi, transitionId=41) # Done transtion, In Progress -> Done
File "/usr/local/lib/python2.7/dist-packages/jira/client.py", line 83, in wrapper
result = func(*arg_list, **kwargs)
TypeError: transition_issue() takes at least 3 arguments (2 given)

 

I have checked the workflow, there are no preconditions, or screens involved, no values that need to be set as far as I can tell. I can log into JIRA and execute this transition as the same user that the python script is using and perform the transition without any problem. It only shows when using the JIRA python api.

 

Any ideas how I can figure out what this routine requires?

 

1 answer

This widget could not be displayed.

Fixed my issue by updating the notation to jira.transition_issue(kpi, '41') 

It pre-dated the working version so it took a while for me to try it.

Notation described at:

https://jira-python.readthedocs.org/en/latest/ under the 'Transitions' section.

Doh!

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

171 views 1 3
Join discussion

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