Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Checklist Add check input

Mitch Wiemans February 25, 2019

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: 

  • Meets SLA Requirements.
  • On Site Support
  • Remote Support

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?

1 answer

0 votes
Maxime Lefebvre _Okapya_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 18, 2019

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

Suggest an answer

Log in or Sign up to answer