A4J Rule: cyclical automation - creating issuetype A should create subtasks and closing issuetype A should close subtasks and create issuetypeB
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
This is an example rule. Creating rules to meet specific requirement is outside of Atlassian Support Scope. These example are for reference only and not prescriptive.
Every Environment is different and so is every requirement. Our intention here is to share what we learned along the way. Even if you cannot use the rule exactly described, we hope the concepts should be helpful in designing your own Automation rules.
Automation for Jira is a powerful tool. We expect you to follow your organisational Change Management policies. Please test before implementing on production environment.
Purpose:
- When an issue of Issue Type A is created - it should automatically create a bunch of subtasks.
- When that issue of Issue Type A is closed - it should close the existing subtasks under it and also create another issue of Issue Type B
- This newly created Issue Type B should also create a bunch of subtasks under it - and so on.
Solution
In summary the approach could be:
- We need two separate rules for the use case because the whole framework has two triggers (i.e., issue type created and issue type closed)
- We can keep Rule #1 for creating the subtasks when a certain issue type is created
- We need Rule #2 to be triggered on a parent issue type closure and to create a new parent issue type
- The Rule #2 action of creating the new parent issue type would trigger the first rule again (cyclical)
- The trick is to check the "Check to allow other rule actions to trigger this rule" for Rule #1 so that the sub-task creation rule can be triggered by the closure rule
Rule #1 | Rule #2 |
---|---|
|
|