Forums

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

JSM DC: Cascading issue on custom fields (cascading by scripting Scriptrunner)

Saqib Dar March 15, 2023

Hi Everyone,

 JSM DC: Cascading issue on custom fields (cascading by scripting Scriptrunner)

I am facing two issues while cascading through scriptrunner on 2 custom fields.

customfiled B depends on customfield A

1. Performance issue(takes few seconds 2 cascade or appear list on customfield B)

2. While changing options on customfield A, the old value on customfield not automatically removes.

 

Thanks in advance

1 answer

0 votes
Juan Carlos Vera
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 15, 2023

To report the value of a cascading field (field 2) with the value of another cascading field (field 1) in Jira Cloud Automation, you can use the following sequence of actions:

jsonCopy code

{

"fields": {

"customfield_FIELD2":
{"value": "{{issue.fields.customfield_FIELD1.value}}",
"child": "{{issue.fields.customfield_FIELD1.child.value}}"
}

}
}

Replace "field1" and "field2" with the names of the custom cascade fields you created. This code sets the value of the cascade 1 field to the value of the cascade 2 field. Note that the value of "child" is optional, depending on whether or not your cascade field has child options.

To use this code in Jira Cloud Automation, follow these steps:

  • Go to the automation section in your Jira Cloud project.
  • Create a new automation rule and select an event that triggers the rule.
  • Add an "Edit Issue" action.
  • Select "Run code" as the action type.
  • Copy and paste the above code into the code field.
  • Make sure that the names of the cascading custom fields correspond to the names of the custom fields that you have created.
  • Save the automation rule.

With these steps, you will have set up your automation to report the value of one cascading field with the value of another cascading field.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events