Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

can subtasks be created for an issue with a different label for each subtask from automations?

Jamie Salter May 11, 2023

My company has recently started using Jira, predominantly as a fault management system. We are currently using the free plan but only to get a feel for the software before upgrading to either standard/premium.

To give context to the question, the scenario is as follows:

When we decide that an issue requires some form of containment there is a checkbox the kicks off an automation which creates a containment task related to the parent issue. The containment and the parent will share the same custom field which is a label field named Vehicles affected

When this task is approved we want an automation the creates a subtask, with the documentation and summary of the containment action, for EACH label in the field above.

On top of that (due to the size of the fleet of vehicles) there is a label for full fleet which, if selected needs to create a subtask for every vehicle in that group.

I saw this process implemented at a previous company so I know it is possible, I'm just not sure where to start. 

Any help would be greatly appreciated and I have included some screenshots below for context.

image.pngScreenshot 2023-05-11 103926.png

 

1 answer

0 votes
Trudy Claspill
Community Champion
May 11, 2023

Hello @Jamie Salter 

Welcome to the Atlassian community.

You can use the Advanced Branching feature to loop over each value in the Vehicles Affected field to create a subtask for each one. Ignore the trigger in my example.

Screen Shot 2023-05-11 at 8.41.28 AM.png

That addresses the values that are specific vehicles, but doesn't address the need for multiple subtasks for the full fleet value. I haven't worked out the details that. But with what I put above I would probably insert a Condition after the start of the branch to say "If AffectedVehicle is not equal to full fleet" to prevent a single subtask from being created for that value.

You might use an If-Else block before the first to check if the field contains full fleet. If it doesn't then you use the For Each loop. If it does contain full fleet then you have to create the multiple subtasks. I haven't yet figured out if you can somehow loop of the list of possible vehicles to do that or if you have to create each subtask individually. (Substitute your "Vehicles Affected" field where I used "Labels".

Screen Shot 2023-05-11 at 8.47.32 AM.png

Jamie Salter May 11, 2023

Hi @Trudy Claspill thanks for the welcome and for the help! That makes sense for how to achieve it for individual vehicles so thanks for that! When those individual sub-tasks are created is there a way to include the "label" that created them in the info, this would help to track tasks against each vehicle via dashboards etc.?

 

With regards to the full fleet scenario, as I mentioned in my original post, the company I worked at previously did something similar where they had lets say, "All RHD Vehicles" as a label and that then created a subtask for all vehicles within that group. So the answer may lie in grouped labels?

 

Many thanks again for your help!

Trudy Claspill
Community Champion
May 12, 2023

is there a way to include the "label" that created them in the info, this would help to track tasks against each vehicle via dashboards etc.?

Yes, the smart value {{AffectedVehicle}} is the Label value. You can use that smart value to set the value of the Labels field in the created issue.

Screen Shot 2023-05-12 at 7.19.18 AM.png

Like Jamie Salter likes this
Trudy Claspill
Community Champion
May 12, 2023

So the answer may lie in grouped labels?

I'm not sure what you mean by "grouped labels".

Jamie Salter May 15, 2023

Sorry, I think I misread what I was looking at! 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events