I am trying to set a custom field as required when the selected Resolution equals "Functions as Designed" and have the custom field hidden if that Resolution is not selected.
Here is what I'm trying:
The result is that the custom field remains hidden no matter what Resolution is selected.
Hi @Chris Horton - CDHS ,
please, try this:
import com.atlassian.jira.issue.resolution.Resolution
def resolutionField = getFieldById(getFieldChanged())
def fadField = getFieldById("customfield_12771")
def resolution = resolutionField.getValue() as Resolution
if (resolution.name == "Functions as Designed") {
fadField.setHidden(false)
fadField.setRequired(true)
} else {
fadField.setHidden(true)
fadField.setRequired(false)
}
that works. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.