Create Sub Tasks based on checkbox selections

Issue #765 resolved
Spirit Super created an issue

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)

  1. Fidel Castro Armario repo owner

    Hi @Tasplan,

    You can do it using "Create issues and subtasks" post-function with a configuration like the following one:

    Captura de pantalla 2017-08-24 a las 8.08.08.png

    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.

  2. Spirit Super 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

  3. Fidel Castro Armario repo owner

    Hi @Tasplan,

    You can do it doing the following 2 modifications:

    1. Use the following seed strings expression: Captura de pantalla 2017-08-24 a las 9.32.34.png filterByPredicate(toStringList(%{nnnnn}), ^% not in fieldValue(%{nnnnn}, subtasks()))replacing nnnnn with field code for Sign-Off Areas custom field.
    2. 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: Captura de pantalla 2017-08-24 a las 9.31.40.png
  4. Log in to comment