Script & Automation Usage

Behaviours

 

 

def MultiLevelField = getFieldById(getFieldChanged()) def MultiLevelField2 = getFieldById("customfield_10146") MultiLevelField.setHelpText("val: " + field.getValue()) //See the selected value's id if (MultiLevelField.getValue() == "12") { //MultiLevelField value id MultiLevelField2.setHidden(true) MultiLevelField2.setRequired(false) MultiLevelField2.setFormValue(false) -> cannot be use } else { MultiLevelField2.setHidden(false) MultiLevelField2.setRequired(true) }

 

Jira Automation

Condition on Multi Level Fields

Screenshot 2024-07-17 at 20.21.45.png

Copying Multi Level Fields

When Multi Level fields need to be copied to another issue using automation, use the JSON formats below:

Tree & Path (Single Select), Multi Level types:

{ "fields": { "customfield_10119": {{ issue.customfield_10119.idAsString.asJsonObject("id")}} } }

Tree & Path (Multi Select) types:

{ "fields": { "customfield_10201" : {{ issue.customfield_10201.idAsString.asJsonObject("id").asJsonArray}} } }

Â