You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi. For our pipeline, we need to know how to set automation for a custom issue type, so that the automation;
1) Check the statuses of all the sub-tasks belonging to the parent issue.
2) Transition the parent issue to the same status as the sub-task that has the status FURTHEST TO THE LEFT (earliest) in the Workflow (or upwards in the workflow map).
As we need to have the parent issue in a status that reflects how far the least worked-on sub-task has come in the pipeline.
Does anyone know how to do this?
Hello @Daniel Ronnstam
What have you got so far for your automation for this?
Here is the start of a rule for one way you could accomplish this. I'm sure there are other ways, and I may think of a more elegant one later.
The inelegant part of this is that you have to set of multiple IF/Conditions within the branch based on the available statuses, because you can't embed an IF/ELSE structure under a branch.. The first one checks if there are any sub-tasks in the left-most status of your workflow. If so, then set the parent status accordingly.
For the next set of conditions you have to check if there are any sub-tasks in the next status in the workflow AND confirm there are no sub-task in earlier statuses. You have to do this because without the ELSE structure the second set of conditions will be check even if the first set of conditions was matched.
Say you have a parent issue that has Sub-tasks that are in To Do and some Sub-tasks that are in In Progress. The first IF would find there are Sub-tasks in To Do and set the parent to To Do. The second set of conditions would initially find Sub-tasks in In Progress. If you didn't also check that there were no Sub-tasks in To Do, then the parent would be transitioned again to In Progress because some Sub-tasks are In Progress.
Brainstorming...
Another way to do this that would allow you to have an If/Else block would be to have one rule that is triggered by the Sub-task transitioning. In that rule only set a flag on the parent to note that a sub-task was transitioned.
Then have a second rule that looks for a change in that Flag for the parent issue. Remove the flag, then use If/Else blocks to check for the statuses of Sub-tasks and set the parent issue status accordingly.
You would have to make sure that this rule had in the Details the box checked to "allow other rule actions to trigger this rule"
I tried the first solution, and "almost" got it to work. The first rule works but not the second. I'm only trying with 3 statuses for now although I would need about 6 in the finished version. Is there something wrong with the "OR" logic? Will that not work?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the order of your statuses?
This step
should include only the statuses that are earlier in the workflow than this step
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.
In that case you second IF statement should be looking for
Some Sub-tasks match
status = "WAITING"
AND No Sub-tasks match
status = "TO DO"
Then you would have a third IF statement like
Some Sub-tasks match
status = "IN PROGRESS"
AND No Sub-tasks match
status in ("TO DO", "WAITING")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok gotcha. I will try this. Actually, I have the following statuses in total. I noticed that it takes about 1 min before the parent ticket auto-moves. I guess that is because all the IF statements?
TO DO
WAITING
IN PROGRESS
UI REVIEW
CODE REVIEW
QA
TEST
UAT
DONE
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.
When saying a rule doesn't work, it is helpful if you provide the Audit Log details for the rule.
I went ahead and constructed the rule in my own environment to see how it would work. And I found it did not work. When there were no subtasks in the To Do status, the rule stopped executing at that first IF block.
I found that I had to separate the IF blocks into their own Branches, thus.
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.
I almost got it working. It works for some steps in the full pipeline, but got the following log error. Are there some errors in the syntax?
ACTION DETAILS:
["10002"]
ISSUE CONDITION
The following issues passed:
VP-15
RELATED ISSUES CONDITION
The following issues did not match the condition:
VP-5
RELATED ISSUES CONDITION
The following issues did not match the condition:
VP-5
RELATED ISSUES CONDITION
The following issues did not match the condition:
VP-5
RELATED ISSUES CONDITION
The following issues passed:
VP-5
RELATED ISSUES CONDITION
JQL search failed for some issues. This is most likely because the JQL with smart-values was not valid for this query:
"((parent = VP-5) AND (status = ("TO DO", "WAITING", "IN PROGRESS"))) AND (project in (10002))" - Operator '=' does not support the list value '("TO DO", "WAITING", "IN PROGRESS")' for field 'status'.
The following issues did not match the condition:
VP-5
RELATED ISSUES CONDITION
The following issues passed:
VP-5
RELATED ISSUES CONDITION
JQL search failed for some issues. This is most likely because the JQL with smart-values was not valid for this query:
"((parent = VP-5) AND (status = ("TO DO", "WAITING", "IN PROGRESS", "UI REVIEW"))) AND (project in (10002))" - Operator '=' does not support the list value '("TO DO", "WAITING", "IN PROGRESS", "UI REVIEW")' for field 'status'.
The following issues did not match the condition:
VP-5
RELATED ISSUES CONDITION
The following issues passed:
VP-5
RELATED ISSUES CONDITION
JQL search failed for some issues. This is most likely because the JQL with smart-values was not valid for this query:
"((parent = VP-5) AND (status = ("TO DO", "WAITING", "IN PROGRESS", "UI REVIEW", "CODE REVIEW"))) AND (project in (10002))" - Operator '=' does not support the list value '("TO DO", "WAITING", "IN PROGRESS", "UI REVIEW", "CODE REVIEW")' for field 'status'.
The following issues did not match the condition:
VP-5
RELATED ISSUES CONDITION
The following issues did not match the condition:
VP-5
RELATED ISSUES CONDITION
The following issues did not match the condition:
VP-5
RELATED ISSUES CONDITION
The following issues did not match the condition:
VP-5
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The error message tells you what the problem is.
JQL search failed for some issues. This is most likely because the JQL with smart-values was not valid for this query:
"((parent = VP-5) AND (status = ("TO DO", "WAITING", "IN PROGRESS"))) AND (project in (10002))" - Operator '=' does not support the list value '("TO DO", "WAITING", "IN PROGRESS")' for field 'status'.
You need to change the JQL to
status in (<comma separated list of values>)
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.
If you have been able to successfully complete the automation rule and it is working as you desire, please consider marking the Answer as Accepted to help other users find posts with validated solutions.
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.
Great! Glad I could help.
If your question has been answered please consider marking this Answer as Accepted to help other users find posts with validated solutions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks!!! I will try out some of these ideas today or tomorrow and get back to you.
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.