Jira Cloud Automaton - Custom field text to custom field drop down?

Mike Singleton March 20, 2022

Hello,

I have a custom field (single line) that I am populating with the possible values
Small (weeks),
Medium (months),
Large (quarter)
XLarge (quarters),
XXLarge (year)

which once filled out (on edit) I want to match with another custom field that has these exact same values and via automation have the same value selected and saved.

1 answer

0 votes
Ivan Lima
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, 2022

Hi @Mike Singleton, here is a similar post where you can get some insights into implementing it using Automation for Jira. Have a look, and let us know if you can apply it to your use case.

Mike Singleton March 21, 2022

I don't think I need to clear the field "T-Shirt Size Estimate" just copy the value from the other field "Build". What would I modify in the statement below to do this?

{
"update" : {
"T-Shirt Size Estimate" : [{"set": []}]
}
}

Mike Singleton March 21, 2022

I tried with no luck

 {
"fields": {
"customfield_11305": "{{issue.customfield_11304}}"
}
}

Ivan Lima
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 21, 2022

Fields is a shortcut for calling update with the set operation. See more details here. I'd suggest breaking your implementation into smaller steps so you can resolve one piece at a time. For a single-select custom field, you should be using the following: 

"customfield_11449" : { "value": "option3" } 
or
"customfield_11449" : { "id": 10112 }

Once you make that work, you can use a smart value to set the option. See Find the smart value for your field for more details.

Like Mike Singleton likes this
Mike Singleton March 22, 2022

so it would be something like

IF the value in the source field (11305) is "Small (Value 10491)" then update the target  (11304) with that value?

 {
"fields": {

"customfield_11304" : { "id": "10491" }


}
}

Suggest an answer

Log in or Sign up to answer