I'd like to hide a field based on another field's value. if summary's value contains 'XYZ', then hide, otherwise not hide. I'm not sure how to express field contains xxx keywords in script and my script now is like below.
However, even if summary equals exactly XYZ, this code still doesn't work when I edit the issue. Anyone can give a hint or revise for this?
def customField = getFieldByName("custom1")
def hidefield = getFieldByName("Summary")
customField.setHidden(false)
// check to see which screen you are on
if ( hidefield == "XYZ") {
// hide field during issue creation
customField.setHidden(true)
}