Automation
Asked by Sabrina Sykes-Gelder:

Hi

I am trying to create a simple task list and have got some of the automation to work but not all.

When I add a task X, it auto creates 3 sub-tasks and task Y - which is what I want.

However, what I need to happen next is when task Y is set to In Progress, I want another set of sub tasks to be created within task Y.

No matter what I am trying I can't get this to work and the new sub tasks are being created under task X.

I feel like I am missing something really obvious!

Thanks in advance


Answers:
author: David Blank
body: Hi [@Sabrina Sykes-Gelder](/t5/user/viewprofilepage/user-id/5316799) and welcome to the Atlassian community!

Would you share screenshots of the automation and audit log with us to see your logic and how your rule is evaluating the issues you are using to test?

Are you attempting to create this in a single automation? It sounds like you might want to break this into two automations as you are triggering one on create and the second on a transition.

Let me know if this helps or if you can provide more detail to troubleshoot further.

comments: author: Sabrina Sykes-Gelder
body: Thank you both for your responses.

I was trying to create one automation which is trigged after the first task was created. I had also tried to create the second automation but wasn't having any luck with that either.

I have since tried Rilwan's suggestion but still can't get this to work.

I have uploaded 3 images that show you where I am. I am unsure exactly what I need to enter into the JQL as when I tried the suggested format, the sub tasks did not create.

When I create a new item, the 3 sub tasks and task Y work as expected but it is the second stage I can't resolve.

I only want the additional tasks to generate under Task Y, once the status for Task Y has been moved to In Progress.

![Current list view.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/280890i3C6FB33725075F4A/image-size/large?v=v2&px=999 "Current list view.PNG")![Task X - 3 sub tasks plus one additional Task Y.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/280891i18BF19DBE7FDB2C5/image-size/large?v=v2&px=999 "Task X - 3 sub tasks plus one additional Task Y.PNG")![Task Yb Marketing actions.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/280892iE7500A33905C97C1/image-size/large?v=v2&px=999 "Task Yb Marketing actions.PNG")


author: David Blank
body: Hi [@Sabrina Sykes-Gelder](/t5/user/viewprofilepage/user-id/5316799) !

It looks like you're almost there! Have you tried:

For your JQL:

summary \~ Task Y


author: Sabrina Sykes-Gelder
body: Hi [@David Blank](/t5/user/viewprofilepage/user-id/4116552)   
I am feeling rather silly but in the JQL box, do I enter the **summary** **\~ Task Y** exactly as you have typed it? I have tried to do that but it didn't work.

Apologies, I haven't used this before.


author: David Blank
body: [@Sabrina Sykes-Gelder](/t5/user/viewprofilepage/user-id/5316799) No, that was my fault! You need quotations around it.

Like:

summary \~ "Task Y"


author: Sabrina Sykes-Gelder
body: Whoop Whoop - thank you sooooooo much!!

It is now working :-)


author: David Blank
body: We did it!

Note: I sometimes remove the first part of your rule trigger (To Do) so that any transition to Done will trigger your automation. I didn't expect it, but some of our Users just go straight to done without transitioning to In Progress. For me, my automation wasn't triggering because of this.


author: Sabrina Sykes-Gelder

author: Rilwan Ahmed
body: Hi [@Sabrina Sykes-Gelder](/t5/user/viewprofilepage/user-id/5316799) ,

Welcome to the community !!

As said by [@David Blank](/t5/user/viewprofilepage/user-id/4116552) , you need to have 2 different rule. Let the first rule create 3 sub-tasks and task Y

Assuming you are able to create Task Y from first automation, it will have a same Summary and issue type for all Task Y's. Let me assume summary as "ABC Summary" and Issue type as "Task". So the second rule should run as follows

1. Trigger = Issue Transitioned
2. Component == IF: Add a condition
   * JQL Condition: Issuetype = Task and Summary \~ "ABC Summary"   
     You can add more conditions as required
3. THEN: Add an action == Create Sub task  
   * Add summary and other fields , Save and publish the rule.

Your rule should look similar to this.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/280781i9427CBA107D2BA9C/image-dimensions/307x168?v=v2 "image.png")

<br />

<br />