Hi Community,
I need a behaviour, mapped to a issuetype in a project, so that when clicking on "Create" and select this project and issuetype, there are 3 custom fields that must be displayed in the screen, only if I select a specific value on other cascading custom field. I thought it was an easy thing, but it is not working. In Initialiser, I have put this code:
if (getActionName() in ["Create Issue", "Create"]) {
def fieldToHide1 = getFieldByName("Risk")
def fieldToHide2 = getFieldByName("Vul")
def fieldToHide3 = getFieldByName("Group")
fieldToHide1.setHidden(true)
fieldToHide2.setHidden(true)
fieldToHide3.setHidden(true)
fieldToHide1.setRequired(false)
fieldToHide2.setRequired(false)
fieldToHide4.setRequired(false)
def cfield = getFieldByName("Source")
Map mapValue = cfield.getValue() as Map
if (mapValue.get(1) == "SUR") {
fieldToHide1.setHidden(false)
fieldToHide2.setHidden(false)
fieldToHide3.setHidden(false)
fieldToHide1.setRequired(true)
fieldToHide2.setRequired(true)
fieldToHide3.setRequired(true)
}}
Please, I appreciate any help. Thanks!