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.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.