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

Status transition throws Exception but succeeds Edited

I am trying to perform a simple status transition using the jira python library as follows:

 

jira_client.transition_issue(issue, "Start Work")

 

I get the following exception but the transition does succeed!

 

Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/jira/client.py", line 1554, in transition_issue
transitionId = int(transition)
ValueError: invalid literal for int() with base 10: 'Start Work'

During handling of the above exception, another exception occurre

Traceback (most recent call last):
File "./move_issues.py", line 58, in <module>
update_issues("Test Sprint 1", "Reopened", "Closed", "1.0.0")
File "./move_issues.py", line 51, in update_issues
jira_client.transition_issue(value, "Start Work")
File "/usr/local/lib/python3.6/dist-packages/jira/client.py", line 126, in wrapper
result = func(*arg_list, **kwargs)

File "/usr/local/lib/python3.6/dist-packages/jira/client.py", line 1559, in transition_issue
raise JIRAError("Invalid transition name. %s" % transition)
jira.exceptions.JIRAError: JiraError HTTP Invalid transition name. Start Work

 

The behavior seems totally random cause the above takes place in a for loop and for another issue, (in the same loop!) the error is not thrown!

 

edit: for some reason it seems to be related with the issues being transitioned in a for loop; When I do this one by one everything seems to work OK. What is the reason behind this;

 

Do I need to close and re-open the client connection each time?

1 answer

I'm noticing the same behaviour... This is not good!

Suggest an answer

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

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

275 views 1 2
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you