Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira API - How to make updates to fields with multiple drop downs?

Conor McCourt
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 14, 2019

Hello, 

1 answer

0 votes
Andy Heinzer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 20, 2019

Hi Conor,

Did you find a solution for this problem?  I see you removed the content of this message, so I'm not sure if you wanted to remove this or not.  Just let me know, I can remove this post if need be.

To try to answer this question, Yes it should be possible to do with Jira, at least via the REST API, however it does have some additional requirements.  First off, the transition being called has to have a separate screen assigned to it to complete the transition.  Not all transitions have this by default, but this is something that would be setup in the workflow for this issue.

In addition to that point, we need to make sure that this drop-down field appears in that screen.  Otherwise you can't update that field during this transition.   But if those two things are true, you could use a json payload such as:

"update": {
"comment": [
{
"add": {
"body": "Bug has been fixed."}
}
],
"customfield_11539" : [{"set" : {"value" : "Red","child": {"value":"Triangle"}}}]
},
"fields": {
"assignee": {
"name": "bob"
},
"resolution": {
"name": "Fixed"
}
},
"transition": {
"id": "5"
}

In this case the custom field has an id of 11539, the first value is 'Red' and the cascade 2nd value permits a value of 'Triangle'

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events