Automation - Branch Sub-tasks
Asked by Emirhan T?rkay:

Hi Everyone

My question is, when the status of a different issue type within the same project is set to success/sold, a new issue of a different issue type is created in the same project. This newly created issue also has a sub-task associated with it. I want to perform actions on this sub-task. For example, if the Project Manager field in the sub-task is empty, then transition the issue to work in progress. How can I do this? I'm sharing a screenshot of the rule I created.

Thank you in advance.  

![image (6).png](/t5/image/serverpage/image-id/339950iA61E2106D24024DB/image-size/large?v=v2&px=999 "image (6).png")


Answers:
author: Jovin
body: Hey [@Emirhan T?rkay](/t5/user/viewprofilepage/user-id/5483448)

Issue creation is scoped to the branch its in, as such the Sub-task you create would not be able to be branched and worked on again.

Simplest way around this would be to have a 2nd automation rule that has the checkbox on the details "Allow this rule to be triggered from other automation rules" and set it up below:

* Trigger: Issue created
* Condition: IF issue type = Sub-task AND Project Manager IS EMPTY
* Action: Transition issue to Work in Progress

comments: author: Emirhan T?rkay
body: This is my new rule:  
However, the audit log shows a different issue. I want to create a sub-task under the newly created issue mentioned in my previous message. Additionally, I want the status of the newly created parent issue to change when the status of the sub-task changes. I am attaching the images.

Thank you in advance.  
![image (7).png](https://community.atlassian.com/t5/image/serverpage/image-id/339978iD0D28D3920DA9DE2/image-size/large?v=v2&px=999 "image (7).png")![image (8).png](https://community.atlassian.com/t5/image/serverpage/image-id/339979iE9C271001EAEDC21/image-size/large?v=v2&px=999 "image (8).png")


author: Manav Shah
body: Here, the best solution is to create two separate automation rules.

1.  
a. Trigger = when issue is transitioned to success/sold  
b. Action = create new issue in issuetype "BC - Project Handover"

2.  
a. Trigger = when issue is created  
b. Field condition = issuetype is "BC - Project Handover"   
c. Field condition = status is equal to "Open"  
d. Create issue = sub-task in KocDigital IOT  
e. Create a branch = for sub task   
f. Field condition = Project Manager is EMPTY  
g. Action = transition issue to "WIP"

comments: author: Emirhan T?rkay
body: This is my new rule:  
However, the audit log shows a different issue. I want to create a sub-task under the newly created issue mentioned in my previous message. Additionally, I want the status of the newly created parent issue to change when the status of the sub-task changes. I am attaching the images.

Thank you in advance.![image (7).png](https://community.atlassian.com/t5/image/serverpage/image-id/339976iDBC7827EDEF39A62/image-size/large?v=v2&px=999 "image (7).png")![image (8).png](https://community.atlassian.com/t5/image/serverpage/image-id/339977iCD49279F4085CB88/image-size/large?v=v2&px=999 "image (8).png")


author: Manav Shah
body: Can you add a condition: "Project Manager is EMPTY" before and then put "Then: Assign the issue to"?


author: Manav Shah
body: [@Emirhan T?rkay](/t5/user/viewprofilepage/user-id/5483448) did it work out?


Tags: cloud

jira-service-management

jira-service-management-cloud