Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hi,
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?
Regards,
Akhil
cfValues['DOD']*.value.contains("start")
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.contains(
"start","stop","resolve
")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
cfValues[
'DOD'
]*.value in ['start', 'stop', 'resolve']
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 127.0.0.1 /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]]]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In condition tester run:
cfValues[
'DOD'
].value*.value.contains(
"start")
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
! cfValues['DOD'].value*.value.contains("start")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie,
Below is the output of cfValues[
'DOD'
]*.value in ['start', 'stop', 'resolve'] in condition tester.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.