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
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

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 now
AUG Leaders

Atlassian Community Events