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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,949
Community Members
 
Community Events
176
Community Groups

How to create new issue with sub-tasks when creating a new sprint

Edited

We have a standard set of tasks and sub-tasks that are created whenever a new sprint is created.  I would like to automate this, it appears that it is straightforward.  I must be missing something obvious.

1. When Sprint is created 

2. Then Create Issue

3. And Create 1 Sub-Task

When trying to publish the rule.  I receive the following error.  I've tried adding a branch with the "issues in the sprint" value selected, but this does not work.

Also, if I remove the create sub-task then the rule works fine.

I have added a screenshot.

Any Ideas where I am going wrong?

Error

  • The rule has been configured with components that require issues to be provided by the trigger. To run these components you must add a branch for this sprint or JQL. The following components require issues: Create sub-tasks

Thank you.  Matt

2020-01-04_12-23-32.png

3 answers

1 accepted

5 votes
Answer accepted
wwalser Atlassian Team Jan 05, 2020

Matt,

Just quickly, here is what you want:

Screen Shot 2020-01-06 at 2.54.15 pm.png

I’ll also explain in case that’s helpful to others or to yourself in the future.

It helps to understand what is happening as a chain of components execute in an Automation. As each step executes, it writes any relevant details into what we call the “context object”. This is the object from which smart values are pulled.

Most automations trigger on some manipulation of an issue, so it is often the case that {{issue}} exists within this context object. Lots of actions implicitly read this {{issue}} value to understand what issue to operate on.

In your case, because the automation isn’t triggered on an issue, there is no {{issue}} in context. Because of this, the Create Sub-task step doesn’t know where to create the sub-task.

You may think that the Create Issue action should push a value into {{issue}}, but it doesn’t. Instead, it pushes a value into {{createdIssue}}. My screenshot above works around this by using a branch component on `most recently created issue`. Branches maintain their own context and this specific one effectively takes the value on {{createdIssue}} and treats it as the {{issue}} for all of it components.

Hope that helps,
Wes

Wes, all of that makes sense.  Thank you for your quick reply.  I applied the suggested changes and it work perfectly.

Great product, by the way.

Like Lyz_X likes this

Matt, Thanks for the tip!

Thanks...!

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events