Hello,
I have a question regarding validating a Jira Checklist.
We are currently using a Add-On named Checklist which gives us the opportunity to validate / transition issues based on the input.
Now the situation:
We have 1 checklist with 3 options:
When Meets SLA Requirements is not checked, we go to the status: Waiting for customer. This is approved by the following condition:
if(issue.get("customfield_10538")?.first()?.checked == true) { false } else if(issue.get("customfield_10538")?.first()?.checked == false) { true }
But now, I want to check if the 2nd or 3rd option is checked as well so that we can transition to something else. But changing the .first to .second or .third does not work.
How can i do this?
Hi Mitch,
I guess you are using GroovyScript? You can probably access each row by using the array index.
customFieldValue = issue.get("customField_10538")
if (customFieldValue != null && customFieldValue[0].checked) {
false
}
...
It is zero-based, which means [0] is the first one and [1] the second one, and so on.
I hope this helps!
Maxime
Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.
Register nowOnline 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.