Create Sub Tasks based on checkbox selections
Hi,
I was wondering if it is possible to create multiple sub-tasks within an issue based on selections in a custom Checkbox field.
For example:
An Issue is created which has a custom field named “Sign-Off Areas” this includes a number of options including: • IT • Marketing • HR • Legal • Finance For each selection made a sub-task would be created within the parent task with the Summary of each including the value of the Check Box e.g. Sign-off required - Marketing.
I can multiple Post Transitions with a Conditional execution for each selection but was hoping there may be an easier way to achieve this.
Any help would be appreciated.
I am using Jira v7.3.6 and JIRA Workflow Toolbox v 2.2.41
Thanks
Comments (5)
-
repo owner -
reporter Thanks for the prompt response @fcarmario, your solution works a treat!
Is it possible to include a similar expression in the conditional execution section to ensure that duplicates are not created if the parent issue goes back through the transition?
Thanks
-
repo owner Hi @Tasplan,
You can do it doing the following 2 modifications:
- Use the following seed strings expression:
filterByPredicate(toStringList(%{nnnnn}), ^% not in fieldValue(%{nnnnn}, subtasks()))
replacing nnnnn with field code for Sign-Off Areas custom field. - Use parameter Set Fields for setting field Sign-Off Areas in each subtask with the value of its corresponding seed string, like shown in the screenshot:
- Use the following seed strings expression:
-
reporter Thanks again for the great support, this works perfectly!
-
repo owner - changed status to resolved
You are welcome.
- Log in to comment
Hi @Tasplan,
You can do it using "Create issues and subtasks" post-function with a configuration like the following one:
Seed string expression is:
toStringList(%{nnnnn})
, replacing nnnnn with field code for Checkboxes custom field "Sign-Off Areas".Then you can use
^%
in advanced parsing mode for referencing each value selected in "Sign-Off Areas" custom field.