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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.