Hello,
Quick summary:
I need to update the Parent US status when any update happens to any of its sub-tasks under these conditions:
1- All sub-tasks are in Done
except for one that should comply with
2- is the last sub-task (not in Done) and has a specific text in it's summary (let's say "last sub-task").
I need help setting up the conditions in the Automation Rule for this to happen only when all tasks are in Done except for the one whose summary is that specific text.
Thanks!
Hi there @Federico Varchavsky
Developer from Automation here.
You should be able to get this working with a variation of our rule template rule "When all sub-tasks are done → move parent to done"
In particular you'll need to slightly adjust the JQL to either look for status done or text contains last sub-task, you may also need to add a second related issues condition if you wanted to enforce that it must also have a sub-task with summary last sub-task.
The above rule setup will check if either all sub-tasks or done or they contain the text last sub-task. As mentioned above if you also want to ensure they do have a sub-task with last sub-task as well you can add an additional related issue condition using "Some match"
I hope this helps.
Hi @Yvan Martin
Thank you for the response and the detailed info you provided me with.
I think this should be exactly what I'm looking for... I'll be trying it later today and let you know if any other issues arise in my automation quest. :)
Thanks for continuing to develop a great product like automation.
Have a great day!
Federico.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nice @Yvan Martin !
Much more elegant than my suggestion. I always forget about the JQL option in the Related Issues condition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have not worked out the details, but my thought is to use multiple Lookup Issue actions to look up groups of subtasks and compare the counts for the returned lists. Something like this:
1. Lookup all the subtasks of the issue. This tells you the total number of subtasks.
2. Lookup all the Done subtasks of the issue.
3. Lookup all the not-Done subtasks of the issue that also have the specified Summary text.
You will probably need to set variables to record the issue count results of each of the above lookups.
Next is some IF/Else nesting.
If #3 returns 1 and only 1 (not 0, not more than 1) result:
Else either the last subtask is already marked as Done, or you have multiple subtasks with the specified Summary text. In either case, you don't want to update the parent issue, and you would exit the rule at this point.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Trudy Claspill , thanks for your response.
How would I code in automation the functions to count the sub-tasks?
Both the total taks and the total tasks in Done status.
After this, it's be simple like this I think:
IF
(
total sub-tasks - total sub-tasks in Done = 1 // how would I code this in automation?
AND
remaining sub-taks summary ~ "Check out tests" // how would I select only the task that's NOT Done for this operaton
)
THEN
(
update parent task status as needed
:)
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How much experience do you have with Automation Rules? There is a lot of documentation available to assist you with constructing rules. The Automation feature within Jira also provides a library of some pre-built functions
And there are more examples available online in the Automation Library sandbox. There is a link to that at the bottom of the Library tab.
As I said, I have not worked out all the details, and I don't have time right now to do so. Here are some quick hints.
To get a list of issues that match a set of criteria (a JQL filter) you can use the Lookup Issues Action.
After executing that action you can find out how many issues were found by referencing this smart value:
{{lookupIssues.size}}
You would need to construct the JQL filters that select the subtasks for each Lookup Issues action. You can reference the Search for Issues documentation to learn more about constructing filters.
Use the Create Variable action to store the data from the above smart value. Subsequent Lookup Issue actions will overwrite the smart value.
There are IF and IF/ELSE condition blocks available when you are constructing rules.
There is an Advanced Compare condition to allow you to compare smart values.
You may need to look at the math expressions documentation to figure out how to make the right statement for "A + B" in the advanced compare.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
How can I translate this condition into automation language?
All but one sub-tasks are Done AND this last sub-task has a summary containing "Check tests".
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Any advice or help on this would be much appreciated.
Thanks! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are two Automations in the library to deal with something very similar to this. One is to mark all sub tasks Resolved when the main task is Resolved, and the other is to mark the main task Resolved when the SubTasks are Resolved. You could probably tweak those to meet your needs. I'm not a Automation expert, but it's something to look at.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
so if I understand correctly your request, you are looking for automation which will change, when last of sub-tasks will not be in DONE resolution and has a specific text in Summary correct?
What should be the trigger point?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes!
It should be triggered when there's only one last taks NOT in Done status and the task has in its summary a specific text, e.g.: "Check out tests".
When these conditions are met the Parent User Story should be update to a specific status, e.g.: "Checking tests".
Hope this clarifies my inquiry.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am having issue telling to system by automation what is the "last sub-task"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hehehe... yeahp!
It's not that easy there to let the system know that all but one sub-task should comply.
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.