How to make subtask matching work

Emilia Glibowska November 9, 2024

I want to automatically move epics to done when all the children tasks are done. I saw a template in the automations and modified it to my needs. The automation however does not seem to work. I have tried the following conditions:

  • status = Done
  • status = Merged
  • status = "Done"
  • status = "Merged"
  • {{issue.status.name}} = "Merged"

I have also tried changing "All sub-tasks" to "Some tasks" to no avail

I have this workflow for epics:

Epics-workflow.png

This workflow for tasks:

Tasks-workflow.png

And this is my automation rule and the result from audit logs:

Automation-config.png

Autidt-log.png

2 answers

1 accepted

3 votes
Answer accepted
Tomislav Tobijas _Koios_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 9, 2024

Hi @Emilia Glibowska ,

There's just one mistake regarding this second IF condition - Epics and Stories (and other standard issue types) have Parent-Child relation. That being said, Epics cannot* have sub-tasks but child issues. So, when using Related issues condition, the option you want here is Children instead of Sub-tasks. With it, automation will look at every child issue connected to that Epic and will then transition it accordingly.
*there are some 'workarounds' with which you can attach sub-tasks to Epics

Additionally, depending on the workflow(s) of child issues, you might want to use syntax such as

statusCategory = Done

With this, you don't need to specify the name or ID of every 'green' status in the workflow(s) of child issue types (if, for example, one workflow has multiple 'green' statuses or issue types use different workflows).

brave_t9NJUjQ0pI.png

Hope this helps.

Cheers,
Tom

Emilia Glibowska November 9, 2024

This was the solution. I am still new to the whole Jira thing and a difference like that is what confused me. Thanks for the reply!

0 votes
Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 9, 2024

Hi @Emilia Glibowska , welcome to the Atlassian Community and thanks for your question.

Please can you try moving the related issues condition before the branch? The trigger is the transition of a subtask, correct? 

I would put the related issues condition and then maybe a refresh, then the branch up to the Epic / parent and then just the transition to Done. You can try it without the condition for the Epic to be In Progress because anyway there isn't a transition to get to Done.

Let us have your feedback if this helps. 

Best wishes

Emilia Glibowska November 9, 2024

But before the branch - that would mean I would be checking the issue that I'm transitioning (a task with no children) and not the parent

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events