Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automatically create sub-tasks based on input of Custom Field (Multiple Select List)

Christopher Moretti May 11, 2023

I have a custom field that lets a user select multiple items in a list.  The items in the list are positions needed for approvals (Risk, safety, etc.)  Not all positions are needed, so I want to create an automation that states when I move an issue from one state (Reviewing) to another state (Routing for Approval) I am prompted with that multiple select list....I select the necessary positions, and when I click Ok - Subtasks (Approval issue type I created) are generated for each position selected with a summar of that position.  So a new subtask would be created with a Summary of [parent.Summary]::[selectedPosition1].  Something like that.  The details of how to reference it all and sync it together is what is throwing me off.

1 answer

3 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2023

Hi @Christopher Moretti,

Welcome to Atlassian Community!

The automation for this should be pretty simple to do, something like this would do it:

Screenshot 2023-05-11 at 10.52.22 AM.png

Just add a "Compare two values" condition for each value in your multi select that should generate a subtask. Because in this case I use subtask it will automatically be linked to the main issue so you do not have link them. You could use a standard issue type too and add the link as part of the create component.

Christopher Moretti May 11, 2023

Awesome, thank you so much!  I figured it wasn't complex, just complicated enough to not be a clear configuration for me.  The {{issue.multiselect}} - does this pick up the multiselect function automatically or do I need to reword that to reference a custom field I created?  Do I need to create a separate automation for each role?  So if multiselect contains Safety, create subtask {{issue.summary}} - Safety Approval.  Then create a new automation with the same setup for each role after that.

Like Mikael Sandberg likes this
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2023

So the {{issue.multiselect}} would be the name of your custom field. You can either use the display name, or if you have multiple fields with the same name, or if you may end up renaming the field in the future, you can use the custom field ID instead. You can get the ID if you go to Settings > Issues > Custom fields and locate the field and then click on the three-dot menu and just hover over one of the options. The URL will contain the ID at the end.

So, if your multi select field is called Positions approval, then the smart value would look like this:

{{issue.Positions approval}}

I would use multiple "Compare two values" component instead of having one automation for each role. Just be aware that automations have a limit of 65 components within a single rule.

Like Christopher Moretti likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events