validating multi check box custom field using script runner plugin


I have a multi check box custom field 'DOD' , which has options/items as start,stop,resolve.

Now what i want to implement is whenever a user tries to close a issue he should have atleast ticked start in custom field, if he has done so he will be able to close issue else he wont.

For this i am using script runner plugin and implemented a workflow validator on close issue as 'simple scripted validator' .

The condition in this simple scripted validator i have put is show below

cfValues[DOD] == 'start'

However this doesnt seems to work and although if the user ticks the 'start' in customfiled DOD he is not able to close issue.

Can someone please help me?



4 answers

1 accepted

0 votes
Answer accepted

try something like above code

Thanks .... that worked

But if i want to check all options then below command doesnt work ...Any idea


cfValues['DOD']*.value in ['start', 'stop', 'resolve']

This also doesnt work for me .... i still see errors in log

2014-03-20 10:24:19,074 http-bio-8080-exec-19 ERROR admin 624x502x1 kffx3j /secure/CommentAssignIssue.jspa [atlassian.jira.workflow.OSWorkflowManager] Caught exception while attempting to perform action 2 from workflow 10300 on issue 'COR-1'

[InvalidInputException: [Error map: [{}]] [Error list: [[error 101]]]

In condition tester run:


and provide the output here. I didn't really read your question properly - you just want to ensure that at least "start" is checked? If so I think the above should do it.

Hi Jamie,

I want to check that all three options(start,stop,resolve) of the DOD custom field should be checked, and only if all 3 options are present then only the transition would happen else it should fail

How do I say does not contain?

! cfValues['DOD'].value*.value.contains("start")

Hi jamie,

Below is the output from condition tester on an issue

javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: value for class: Script1

Hi Jamie,

Below is the output of cfValues['DOD']*.value in ['start', 'stop', 'resolve'] in condition tester.

see attached screenshot below for TICK-5 in which i have checked all 3 options, so as per my understanding the result should evaluate to true but thats not the case.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 13, 2019 in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page


246 views 0 6
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