I am trying to create a simple script validation on the creation of a ticket of type bug where it should throw an error if the epic field (custom field) is empty. Below is what I have written. Once I activate this it always shows (even if the epic link (cfValues[11240]) is filled up). What am I doing wrong?
issue.issueType.name != 'Bug' || cfValues[11240]
Hello @JAY KAPADIA
it should be like this
if (issue.issueType.name == 'Bug' && cfValues[11240] == null) {
return false
}
else {
return true
}
Hello,
Try to log info and have a look what is going wrong. For example like this:
log.error("issue.issueType.name: ${issue.issueType.name}")
log.error("cfValues[11240]: ${cfValues[11240]}")
issue.issueType.name != 'Bug' || cfValues[11240]
The logs will be in the atlassian-jira.log file
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.