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.
- For MultiSelectField with 4 options (Option1, Option2, Option3, Option4):
- Create a Subtask if Option1, Option2, and/or Option3 is selected.
- Do not create a Subtask if Option4 is selected (unless 1, 2, 3 is also selected).
- Do not create multiple subtasks for each option, just one if 1, 2, 3 has been selected.
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)