I want to use Automation to set the status of a Task based on it's Sub-Tasks, I;ve got several sets of Subtasks all with a different prefix.
In the above while the "status != Done" is working and checks the Subtasks, The issue.summary is returning the contents of the Parent, what am I missing to pull the Subtask summary instead?
Hi @Samuel_Stinton -- Welcome to the Atlassian Community!
I do not believe you can use a JQL condition for your test. The expression must be valid JQL, and you are performing a specific comparison for the first condition: comparing a substring of the summary to a defined string.
A work-around for this would be to use a smart value condition, an iterator over the subtasks, with conditional logic, and a math expression. For example:
{{#=}}0{{#issue.subtasks}}{{#if(and(equals(summary.left(3),"IT&"),not(equals(status.name,"Done"))))}}+1{{/}}{{/}}{{/}}
How that expression works is:
Kind regards,
Bill
This is perfect, took me a while to get it filtered down properly and ended up transitioning from status X to Y once all subtasks for X were completed.
Thank you so much Bill!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Samuel_Stinton , welcome to the Atlassian Community and thanks for your question.
Have you tried adjusting the branch for it to be, instead of For: Parent, to be for: Subtasks?
Please test this and share your results.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Had a look with the hope of updating the Parent task on subtask closure and using that to trigger the Subtasks, but while this run successfully it doesn't match any subtasks to the IF and parent does not transition
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Samuel - Welcome to the Atlassian Community!
Use {{triggerIssue.summary instead of issue.summary
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately I'm triggering from a Subtask on Transition, so the Triggerissue wouldn't check the other subtasks
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.