Reputation: 4004
I want to create some dynamic field in Jira similar to what we do in JavaScript.
e.g. there is a dropdown list, with value a, b and c. If I select a, there will pop up some fields only for a; if I select b, there will pop up some fields only for b.
Can this be done in Jira, or are there any plugins that solve this problem?
Upvotes: 3
Views: 3765
Reputation: 17828
You could use the JIRA Behaviours Plugin to change any field according to any selected field, for example:
FormField dropdown = getFieldByName("My Dropdown")
FormField other= getFieldByName("Other field")
if (dropdown.getFormValue() == 'A') {
other.setHidden(false) // set custom filed vlaues
other.setFormValue("A choosen")
} else {
other.setHidden(true) // hide any fields you like
}
Upvotes: 3