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

Jira automation creating new sub task when previous sub task has certain status

marc.gaertner
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 15, 2023

Hi,

I want to set up a Jira automation in which I want to have a new "sub task" created if a previous sub task of the parent ticket is in a certain status (for example "done").

 

In practice the automation should work as follows:

  1. When Ticket is created -> check if it contains component "xy"
  2. If it contains component "xy" then create two new subtasks "1. sent confirmation of receipt to customer" & "2. Prepare information for client"
  3. If sub task "Prepare information for client" is in status "done" then create new ticket on different board "Approve information for client"
  4. If status of ticket "Approve information for client" is set to "approved" then create new subtask "Send information to client" and change status to "Done"

Screenshot 2023-03-15 at 09.55.32.png

I would greatly appreciate the help.

Thanks and best,
Marc

1 answer

0 votes
Ash Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2023 edited

Hi @marc.gaertner , welcome to the Atlassian Community! 

 

I can give you a brief outline how I'd approach it and feel free to tweak it further: 

(I tested the core idea in a sample project I had but your milage may vary).

 

Rule 1: 

  • Go to the Automation page and create a new rule and name it e.g "Sub-task Automation".
  • For the trigger we'll use "When: Issue Created".
  • In the "If" condition section, add the following JQL: "Issue matches JQL: project = <project key> AND component = 'xy'" (replace <project key> with the key of your project).
  • In the "Then" section, add the following actions:

  • "Create issue": create the two new sub-tasks, "Sent confirmation of receipt to customer" along with "Prepare information for client".
  • "Add comment": add a comment to the parent ticket to notify the assignee that the subtasks have been created.

You will need additional automation rules to check the status of the subtask or when its updated as you can't have multiple triggers in a single automation.

(Well you can with the "Multiple issue events" trigger but you'll be creating quite a complex single rule which is more prone to breaking).

See: https://jira.atlassian.com/browse/JSDCLOUD-11903

 

Rule 2:

  • In the "Trigger" section, add the following trigger: "When issue is updated" with the following conditions:
  • "From status": any status (tweak this as you see fit).
  • "To status": Done
  • In the "Then" section, add the following actions:

  • "Create issue": create a new ticket on a different board, "Approve information for client".
  • "Add comment": add a comment to the parent ticket to notify the assignee that the new ticket has been created.

 

Rule 3:

  • In the "Trigger" section, add the following trigger: "When issue transitioned" with the following conditions:
  • "From status": any status (leave blank for that or tweak as see fit like before).
  • "To status": Approved
  • In the "Then" section, add the following actions:

  • "Create issue": create a new sub-task, "Send information to client".
  • "Transition issue": transition the ticket to the "Done" status.
  • "Add comment": add a comment to the parent ticket to notify the assignee that the subtask has been created and the ticket has been transitioned.

 

You might want to consider a custom workflow as automation rules this complex have a higher chance in failing (and they fail dramatically with not a lot of troubleshooting information in the audit log which can be a pain).

 

Hope this helps. 

 

Kind Regards, 

 

Ash

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Upcoming Jira Events