Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,191
Community Members
 
Community Events
184
Community Groups

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!

2 answers

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.

omg I spent hours trying to solve this! yes, it works thanks!

Like Jonathan Doan likes this


jira.transition_issue(issue, transition='Deployed')

it was working while i was using python 2.7 doesn't work with python 3 ..any idea why ?

i even tried 

jira.transition_issue(issue, 'id')

thanks in advance. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events