Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×I want this script to run on all issues that are NOT of the Initiative type.
How can I say in the if & else statements to only do these things if the issue type is not Initiative.
I tried
def issueTypeField = GetFieldByName("Issue Type")
def issueType = issueTypeField.getValue()
if (parent link == null && issueType != "Initiative")
but that didn't work... any help?
//parent link
def parentLinkField = getFieldByName("Parent Link")
def typeOfWorkField = getFieldByName("Type of Work")
def parentlink = parentLinkField.getFormValue()
if (issueContext.issueType.name == "Initiative") {
typeOfWorkField.setRequired(false)
typeOfWorkField.setHidden(false)
}
else if (issueContext.issueType.name !== "Initiative" && parentlink == null ) {
typeOfWorkField.setRequired(true)
typeOfWorkField.setHidden(false)
}
else if (issueContext.issueType.name != "Initiative"){
typeOfWorkField.setRequired(false)
typeOfWorkField.setHidden(true)
}
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.