create subtask -when issue moved into active sprint or in sprint when it starts

Jacob Goldman May 8, 2023

Hi- 

I want to create an automation that automatically creates a placeholder subtask when either:

1) the issue is story/task and is in the sprint when it starts

and

2) the issue is a story/task and is moved into the active sprint

We are trying to enforce always committing code against a sub-task. Automations I've experimented with are resulting in a sub-task being created even if I moved a ticket into the future sprint while I am exploring prioritization.

I recognize that a subtask will get created one way or another, but i am curious how this can be done.


Thank you,

Jacob

1 answer

0 votes
Trudy Claspill
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 9, 2023

Hello @Jacob Goldman 

Can you show us the Automation Rule(s) you've constructed and tell us how they are not meeting your requirement.

There is a rule Trigger for Sprint Started.

You could use that and follow it with a For Branch/Related Issues to retrieve all the issues in the sprint under which you want to create the subtask. You can use either the Issues In Sprint option if you want a subtask created under every issue in the sprint, or the JQL option if you want the subtask created under a subset of issues in the sprint.

Then add the Create Issue action to create the subtask.

Screen Shot 2023-05-09 at 1.46.01 PM.png

 

A rule to add subtasks when an issue is added to an active sprint is a little trickier. I haven't worked out the details for that. It would involve a trigger for the issue being updated, detecting that a value was added to the Sprint field, figuring out which value was added, and then determining if that represented an Active sprint.

Jacob Goldman May 10, 2023

@Trudy Claspill - here are the two rules.

Automation 1 - create a subtask to a story/task when an issue is moved into an active sprint. This would occur if we add work to a sprint this has already been started.

Automation 2 - create a subtask for a story/task for the issues that are in the sprint when it starts. This is more straightforward. If the issues are in the sprint when it starts create a sub-task if there are no sub-tasks.

The issue that is occurring is when I am starting to build out my future sprint that is coming up, automation is creating sub-tasks for the issues that I drag into the future sprint.

I may pull these issues out before we actually start so feel like it's not necessary to create sub-tasks unless they are in the active sprint. I want keep things a bit more organized number-wise (silly I know) but none the less what I want.



Screenshot 2023-05-10 at 5.38.08 PM.pngScreenshot 2023-05-10 at 5.39.37 PM.png

Trudy Claspill
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 10, 2023

The problem with Automation 1 is that you are triggering it based on a change to the Sprint field. So, yes, when you add an issue to a future sprint the Sprint field will be updated and the rule will run.

That is the trickier situation for which I have not had time to work out the steps. I think it might work if you add a condition to check if the issue matches JQL. First make sure that the trigger is happening only when the Sprint field gets a value added (so it won't be triggered if you remove an issue from a sprint).

Screen Shot 2023-05-10 at 6.12.56 PM.png

 

With this condition it will be confirmed that the trigger issue is in an Active sprint. If the issue was already in an Active Sprint you would not be able to also add it to a Future Sprint, since issues can be in only one Active or Future sprint at a time. And you can't add an issue to a Closed sprint. So this should catch an issue being added to an Active sprint, I believe.

 

Screen Shot 2023-05-10 at 6.13.33 PM.png

Jacob Goldman May 16, 2023

@Trudy Claspill - I've tried the smart value of sprint.active {{true}} that didn't seem to work. 

I'll try the jql unless you've had other thoughts.


A great feature for all of these automatons would be some way to test them prior to publishing.

Trudy Claspill
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 16, 2023

I've tried the smart value of sprint.active {{true}} that didn't seem to work. 

How did you try to use that, exactly?

Jacob Goldman May 17, 2023

@Trudy Claspill - here is the current solution.

Previously (I already changed it so don't have screen cap) I was using the advanced compare condition and "sprintActive" and value = {{true}}. I had gotten the smart value of the sprint from inspecting the page as I read that was a way online.

 


Screenshot 2023-05-17 at 5.59.58 PM.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events