Modify a custom gield based on a specific condition

miguel.caba
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!
October 24, 2023

I want to conditionally modify a custom field in Jira. This modification should be triggered by a specific condition related to the 'Cause Field'. For example, when the 'Cause field' is set to "1", I want the ' Category field' to display only the options '1.1','1.2','1.3'.


I have attempted ussing this JSON script: 
{
"update": {
"customfield_11319" : [
    { 
   "set": "1.1,1.2,1.3"
  }
  ]
}
}

But I´m encountering the errpr 'specify a valid 'id' or 'name'. And I´m sure the 'id' of the customfield is correct. Could anyone provide guidance on the correct approach to achieve this? Any help would be greatly appreciated. 

Thank you!

1 answer

1 accepted

2 votes
Answer accepted
Tansu Akdeniz
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 24, 2023

Hi @miguel.caba 

Welcome to the community.

First of all, you would like to set "Category Field", right? (Because automation is not used to change the display values).

Please re-check this Advanced field editing using JSON doc, there are examples to set multi-level fields.

Sample:

Multi-select custom field

"customfield_11448" : [ { "value": "option1" }, { "value": "option2" } ] 
or
"customfield_11448" : [ { "id": 10112 }, { "id": 10115 } ]
miguel.caba
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!
October 25, 2023

Thank you for your reply! 

For example, when the 'Cause field' is set to "1", I want the ' Category field' to display only the options '1.1','1.2','1.3' ('Category Field' has more options).

 

Is it possible to achieve this in Jira, maybe not using automation?

Thank you!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events