Transition an Issue Using jira-python.

I am simply trying to change an issue's status and resolution to resolved.

Per the docs.

My transition IDs

>>> issue = jira.issue('TES-2')
>>> transitions = jira.transitions(issue)
>>> [(t['id'], t['name']) for t in transitions
... ]
[(u'11', u'To Do'), (u'21', u'In Progress'), (u'31', u'Done')]

My Code:

#try 1
jira.transition_issue(issue, '31', resolution={'id': '10000'})
#try 2
jira.transition_issue(issue, '31', resolution={'name': 'Done'})

This yields a 500 error with no message.

 

Per this thread and this other one, I tried:

jira.transition_issue(issue, transitionId='31')

 

This throws an error stating transition issue requires 3 arguments and 2 are given.

I then tried

jira.transition_issue(issue, transitionId='31', assignee={'name': 'admin'})

I get the same error despite having three arguments.

I'm running jira-python 1.3.

I have also downloaded from source and tried 1.7.

My account is an admin.

Any help is greatly appreciated!

1 answer

My use case was only to change status of ticket.  

All you need to change in your previous attempt is do not explicitly mention the word "transitionId="  

jira.transition_issue(issue, '31')

This should work.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 13 hours ago in Hipchat

Moving from Hipchat to Stride? Here’s what you’ll love

Heya, Hipchat friends! We’re so happy you’re checking out   Stride. Whether you know it or not, you have been instrumental in making Stride come to life. Every feature, design, and functionality...

40 views 0 4
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