3

I'm trying to use the Python Jira API to set transition fields but I can't seem to get it through the API call. Some transitions have required fields and I want to be able to add comment/change some of the fields. However, the API isn't giving me the list of required fields for each transition. Some of them have no fields and I have no problem transitioning with those transitions. However, for some transitions like Clean, there are fields inside before you complete the transition. For example, I want to be able to change the resolution for this transition from Fixed to Won't Fix. I can change it manually by looking at the values and doing the transition with the value I want, but this is not ideal. I want to be able to look at all the possible values and be able to choose whichever one the user wants to pick for the resolution. enter image description here

I'm using this code from the JIRA Python API which gives me all the names but not any of the required fields and the values associated with the fields.

issue = jira.issue('PROJ-1')
transitions = jira.transitions(issue)
[(t['id'], t['name']) for t in transitions] 

1 Answer 1

4

To get all the fields, you need to add this.

transitions = jira.transitions(issue, expand="transitions.fields")
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.