I have an automation that is set up that is supposed to help streamline a business process in Jira. So how the automation is set up currently is:
(Step 1) When an epic is created with the custom field system name, it creates a story called “system 1” and links it to the epic.
(Step 2) Then the story (system 1) creates three tasks which are all linked to the story. Task 1, Task 2, and Task 3
(Step 3) Task 3 has three sub-tasks that are created under that task.
Note: When the epic is created in the beginning with the system name it created all of these issues at once I.e., story, tasks & sub-tasks.
The last part I would like to setup is when all of my issues (epic, story, tasks, and subtasks) are transitioned to done (manually). I would like to create a new story called “system 2”.
How can I achieve this? Can someone please provide some guidance on this?
Hi @Michelle -- Welcome to the Atlassian Community!
It is unclear from your question which parts of your scenario are already implemented with rules, and which parts may have problems to correct.
For a question like this, please post images of your complete automation rules, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
Which version of Jira are you using: Cloud, Server, or Data Center? The version you are using will impact which rule features are available to try to solve the scenario.
Kind regards,
Bill
Hi Bill,
Thank you for the warm welcome. I am excited to be here. Please see attached screenshots of my current automation setup in Jira cloud. These are all issues that are created when a user creates an 'Epic' issue type with a system name.
Issues created --> Story, three tasks, and sub-tasks.
First automation:
Second automation:
Third automation:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I need to create a fourth automation which would create a new story issue type called 'System 2' once all of these issue are manually transitioned to 'Done'.
Note: The screenshots shown above are all automations that are properly working. I just need guidance on how to create the fourth automation.
How can I achieve this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Based on the images, you are using Jira Server or Jira Data Center, and not Jira Cloud. I can see that as the rule editor views are different between Cloud and other versions of automation rules.
For your fourth rule to detect when all of the issues are done and then create the new "System 2" issue, the key is: how are these issues related?
If you can write a JQL statement to find all of the issues, you may use the related issues condition to check the status of the group of them. For example, please decide the TODOs in this outline:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tried to add an automation that is shown below to close out all issues before creating a new issue type story and this still doesnt execute properly. Can someone help assist with this so I can see how to have all issues create a new issue type when all issues have been set to done manually?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Without seeing your entire JQL statement...
I believe you want the opposite criteria: search for issues which are not done, and the condition is there are none found.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I understand that part, and I was describing how to check if all of the relevant issues are "done" before creating the new one.
Is your rule working as you expected?
If not, please explain what is not working and post the entire JQL statement used in that condition. Seeing those may help explain why it is not working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am testing the automation in steps. I am trying to see if I can pass the epic and story to be transitioned to be done and create a story then I will add the rest of the clauses. However, it seems that the epic seems to pass the JQL condition however the Story does not seem to be passing and I am unsure why it is not passing when I transition it to done.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As written, that rule cannot work for both Epics and Stories: the JQL conditions you show check if the issue is an Epic and is also a Story. That is not possible.
If you write this initially as two rules, you may find how to combine them.
For example, the "Epic" test rule would be
The "Story" rule needs to go further, testing its parent also:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please re-read what I described earlier...
For your first rule you show, triggered by the Epic, the Related Issues Condition is incorrect. I believe you want to use this:
issueType = "Story"
AND summary ~ "Pre-Assessment"
AND status != Done
This will confirm there are no remaining child issues for the Epic that are not Done.
For the second rule you show, triggered by the Story, there is a missing Related Issues Condition:
"Epic Link" = {{triggerIssue.Epic Link}}
AND issueType = "Story"
AND summary ~ "Pre-Assessment"
AND status != Done
This will confirm there are no remaining child issues for the same Epic parent as the trigger issue that are not Done.
Please make those changes and re-test. If you find the rule does not work as expected due to not matching conditions, compare your issues to the condition to learn why.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It worked!!! Thank you so much.
if I want to continue the automation and have the tasks be added so they are also transitioned to done and then create a story will I follow the same step for automation story? And do I need to update the two existing automations for epic and story to include jql issues not match condition and add the tasks in there as well?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would you please clarify what worked and what remains to be done? It seems you are asking for the same things which were already suggested.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When an epic and story (pre-assessment) is manually transitioned to done the new story (assessment) is created. However, I’d like to add on to the existing automations that are set. So for instance the tasks that are linked to the story “pre-assessment” that was transitioned to done earlier. I would like for the tasks to be manually transitioned to done and then create the story “assessment”. I tried to replicate the steps mentioned above but it did not properly execute. Please see screenshot below:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So in hindsite, the epic, story, tasks need to be done and then the story assessment gets created. I was trying to break the automations into parts. So far it works I just need to add tasks to the already existing automations.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that additional information. For the JQL in the rules like this:
issueType = "Story"
Please change them to this so both issue types are included:
issueType IN ("Story", "Task")
You may learn more about writing JQL like this with this free training and documentation from Atlassian:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill, I am a bit confused from your last comment would I only change the JQL for No JQL issues match and then do issue type In (story, task)?
Because where it says issue matches JQL, is only checking for all task issue types. Not story, since that is part of the other automation you helped setup. Please see screenshot on which JQL statement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To confirm: the Epic can have child issues which are Story or Task type, correct?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The epic only has one link to it which is the story pre assessment. And then the story has three tasks links to it as mentioned in the picture.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The rule will need different / additional steps when testing for the linked issues. The previous change I described for issueType IN ( "Story", "Task" ) is not needed.
Are you using Jira Server or Data Center version? The following will only work if you have the Lookup Issues action with Jira Data Center (or Jira Cloud).
issue IN linkedIssues( {{lookupIssues.first.key}} )
AND issueType = "Task"
AND status != Done
Please add any additional criteria needed to identify the needed Tasks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do have the lookup issues function.
however, when I did that when I transitioned the epic to done it created the new story which shouldn’t happen. Please take a look at my automation screenshots.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let's back up a bit, as I believe we are confusing the different rules for the scenario...
Please take a moment to test the JQL used in those conditions and actions with example issues using an issue search to see if they return what you expect. If not, adjust them.
For example, the Tasks are indirectly related to the Epic, through the Story, and so the JQL you show for the Lookup Issues action cannot work as you expect.
The overall scenario now seems to be:
When all of those are transitioned to Done, you want to create a new Story.
You are trying to solve this with multiple rules:
After testing and reviewing the JQL I believe you will find where to adjust them. Perhaps show your rules to your teammates also to confirm your understanding of the scenario.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.