We are currently using several different Issue Types as Subtasks. One of them is 'Development (sub)' and another is 'QA Testing' and there are others as well. We are trying to configure an Automation rule which will create the 'QA Testing (sub)' subtask within the Parent Story when all 'Development (sub)' Subtasks and the 'QA Test Case (sub)' are in a Done status.
I'm not a JQL expert and am struggling to get it to only trigger when all of the defined Issues Types are Done vs. just one. Below is the beginning of what I have, but I could use the Communities expertise on how best to configure this.
Hey @squal
It looks like you're pretty close! This is how I would suggest setting up the rules:
(There are 2 suggestions for the JQL below)
I'll just state my interpretation of what you want incase it's wrong :)
When all development AND QA test case subtasks are done then create a QA testing subtask.
Some notes to consider:
For the related issue condition make sure you update the condition to "All match specified JQL". I'll explain 2 options for the JQL with varying scope:
First option:
issuetype in ("Development", "QA test case") AND status = Done
This will only run if there are "Development" or "QA test case" subtasks attached to the parent. If any other type of subtask exists it will stop the automation here.
If you want it to run when other subtask exists just extend the JQL with an OR statement.
issuetype in (Development, "QA test case") AND status = Done OR issuetype in ("QA testing", sub-task)
You can see I added an "OR" and then defined the other subtasks that might exists but didn't define any status for the issues in the OR statement.
Also with JQL I'm absolutely not an expert but there is a quick visual way to get JQL. If you go to the top navigation click "Filters" and then "Advanced issue search" you are taken to the global issue navigator.
You can use the drop downs to define what you want:
Then click the "Switch to JQL" button on the right. This will switch what you have selected in the dropdowns the JQL. Just remember to click "Switch to basic" when you want to go back to the dropdown mode.
It won't give you anything with an "OR" statement but its a good way to get the bits you need :)
Thanks,
John
Thanks so much @JD ! I'm still pretty new to automation and JQL and this was a huge help. I restructured this as suggested and everything is working smoothly when it should. However, it's also working when it shouldn't. I ran a bunch of tests using different scenarios with different combinations of our subtask issue types and found that one type of scenario triggers it when it should not.
Problem Scenario
When parent Story has either of the following:
Desired Scenario
What I am trying to do is get it to only fire off if:
Below is what I have based on your feedback. I've tried a number of changes to the JQL and even splitting it out into two separate 'And: Sub-tasks match' statements but can't seem to find a way to first determine that both exist in a Parent Story.
I'm hoping you have another breakthrough tip for me!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@squal ok so with the problem scenario you can just add a few more "related issue conditions" after the one you have (the one with all the JQL).
So I added 2:
The second checks that some sub tasks match issueType = "development"
You don't need to put status in because you already checked that previously. (Also note the different JQL the issue type uses an = instead of an in when you're checking for just one, I got caught on that).
For the bonus 🎉 just remove "QA testing" from the JQL in the related issue condition from last time so it would be something like this:
issueType in ("Development (sub)", "QA Test Case") AND status = Done OR issueType in ("AMS Email request, "Creative (sub)", "Sub-task")
This is because the original related issue condition checks that to "All subtasks match specified JQL", so if it sees any subtasks that you didn't write in the JQL it won't perform the action. (Also with that if you ever add a new subtask type to your project you'll need to update the rule).
Let me know how it goes!
Thanks,
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@JD- Thanks again for the support. Everything works like a charm now! Better yet, your explanations have helped to make a bit more sense of the structures used in Automation (and JQL). I was doing some of what you suggested, but used "IN" instead of "=" and in had some things in the wrong order. Your breakdown was really helpful. I really appreciate the quick responses and willingness to go into so much detail!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I tried your approach:
But it does not work for me. When creating those two Subtasks in the bottem you choose for Parrent Issue "Current Issue", right?
So I have this BPS-Issue. Which, whenever it is created, 4 new subtasks get created for this BPS-Issue. What I want is, that after those 4 issues all set to "Done" 2 new Issues get automatically created. This should work with this approach, or did I miss something?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @thrilos07 - sorry for not noticing your question earlier. Were you able to figure it out or is this still an open item for you?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.