I am trying use Scriptrunner's "Create a sub-task" post-function to automatically create a subtask on a particular transition, and I'm having difficulty writing the condition.
The Example Condition provided by ScriptRunner is close, but it only seems to work for one option, and I haven't figured out the syntax for multiple options.
SCRIPTRUNNER EXAMPLE
'My Value' in cfValues['My Multi List']*.value
Any help is greatly appreciated!
(Jira Server 7.9.2, ScriptRunner v5.4.12)
Try this code.
def values = cfValues['My Multi List']*.value
if ( values.contains('Option 1') || values.contains('Option 2') || values.contains('Option 3')) {
return true
} else {
return false
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got same requirement can you please enhance full code to achieve as I'm new to script runner.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mahesh Kallepalli , Did you manage to solve this, I am also new to script runner and have something similar.
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.