Behaviours
Expand |
---|
title | Script Runner Behaviours / Server-side Script |
---|
|
Code Block |
---|
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
...
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:
Code Block |
---|
|
{
"fields": {
"customfield_10119": {{ issue.customfield_10119.idAsString.asJsonObject("id")}}
}
}
|
Tree & Path (Multi Select) types:
Code Block |
---|
|
{
"fields": {
"customfield_10201" : {{ issue.customfield_10201.idAsString.asJsonObject("id").asJsonArray}}
}
} |