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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

2 answers

1 accepted

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

Thanks...!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

5 mobile apps for Jira Cloud to boost productivity

  It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...

216 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you