Force user to select multiple checkboxes on ticket close

I would like my agents to confirm that specific steps have been taken before they close a ticket. To do this, I created a checkboxes custom field and put some test fields that I would like checked off on. I then put that custom field on a screen and attached that screen to a transition. In the transition, I made the following condition using Script Runner simple scripted validator:

cfValues['Workstation Configuration Checklist']*.value in 
 ['Confirm User AD groups', 'Set user account to force user to change password at next logon', 'Confirm with user that they have changed their password']

 

 

When I attempt to close the ticket, I see the checklist that I assigned to the screen in the transition. If I check no fields, one field, or two fields, it errors out with a custom error stating that I need to ensure all checkboxes are checked. However, when all checkboxes are checked I still get the error. Basically no matter what is checked the condition prevents the transition from happening. Does anyone happen to know what I might be doing incorrectly?

 

1 answer

1 accepted

1 vote

Not tested but you will want:

cfValues['Workstation Configuration Checklist']*.value as Set ==
    [
        'Confirm User AD groups',
        'Set user account to force user to change password at next logon',
        'Confirm with user that they have changed their password'
    ] as Set

Using a Set because you don't care about the ordering.

That worked marvelously! Thank you!

No problem but actually it's not a good way to do it, makes it hard to change the option values, or to add more. This way is much better: https://answers.atlassian.com/questions/42370436

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

49 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you