We use below script to dynamic display Component/s, but it failed, however it works for custom field APP/CI Name.
Anyone knows what's script to dynamic display system field ?
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.jira.groovy.user.FieldBehaviours
def IT_deparment = getFieldById(getFieldChanged())
def component_s = getFieldByName("Component/s")
def app_ci_Name = getFieldByName("APP/CI Name")
//def description = getFieldByName("Description")
def IT_deparment_value = IT_deparment?.value as List
//description.setFormValue("aaaaaaa")
if (IT_deparment_value in [["CN","IT Development-DST"],
["CN","IT Development-B2C"],
["CN","IT Development-SOM"],
["CN","IT Development-IT2IT"]]){
component_s.setHidden(true)
component_s.setRequired(false)
app_ci_Name.setHidden(false)
app_ci_Name.setRequired(true)
}
else {
app_ci_Name.setHidden(true)
app_ci_Name.setRequired(false)
component_s.setHidden(false)
component_s.setRequired(true)
}
Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!
Register todayOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.