Jira REST API transition: set values for child field

Hi!

I am trying to do an issue transition using Python jira package.

jira_auth.transition_issue(issue, '241', customfield_11470 = {'value': 'Инициатива кандидата'})

The issue object is correct: with jira_auth.transitions(issue) I can get all the transitions all right (in fact, there's only one transition available).

However, the transition doesn't occur, and I may guess why: there's one more field which has to be filled, which is shown explicitly when I attempt to do the transition manually.

From the result of transition.fields method for the issue above I conclude that the second field is like a "child field" to customfield_11470:

 "fields": {
"customfield_11470": {
"required": false,
"schema": {
"type": "array",
"items": "string",
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect",
"customId": 11470
},
"name": "HR Rep. Reason",
"operations": [
"set"
],
"allowedValues": [
{
"self": "https://hr-test.glowbyteconsulting.com/rest/api/2/customFieldOption/12540",
"value": "Инициатива GBC",
"id": "12540",
"children": [
{
"self": "https://hr-test.glowbyteconsulting.com/rest/api/2/customFieldOption/12542",
"value": "Из списка отложенных",
"id": "12542"
},
{
"self": "https://hr-test.glowbyteconsulting.com/rest/api/2/customFieldOption/12543",
"value": "Ранее отверг JO",
"id": "12543"
}
]
},
{
"self": "https://hr-test.glowbyteconsulting.com/rest/api/2/customFieldOption/12541",
"value": "Инициатива кандидата",
"id": "12541",
"children": [
{
"self": "https://hr-test.glowbyteconsulting.com/rest/api/2/customFieldOption/12548",
"value": "Обновил резюме",
"id": "12548"
},
{
"self": "https://hr-test.glowbyteconsulting.com/rest/api/2/customFieldOption/12549",
"value": "Вышел на связь с GBC",
"id": "12549"
}
]
}
]
}
}

And I haven't found any name for this second field like custom_#####.

 

Q: How should I rewrite transition_issue method call so that the second field would also be filled?

1 answer

1 accepted

Found it. Actually, the first and the second fields I've mentioned above are one field customfield_11470 of type cascadingselect.

The procedure of setting its and its child's values is pretty the same as updating such a field:

jira_auth.transition_issue(issue, '241',
fields = {
'customfield_11470': {
'value' : 'Инициатива кандидата',
'child': {'value': 'Вышел на связь с GBC'}
}
}
)

This answer helped me.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,221 views 14 19
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot