Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Why is my Rule to transition a parent when all subtasks are completed not working?

Phil Bustin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2023

In the sandbox, I have a working automation that creates one or more sub-tasks (Issue Type = Dev Task) when a particular transition is run.

I modeled the automation after one I found in:

https://community.atlassian.com/t5/Automation-questions/How-can-I-transition-the-parent-when-all-subtasks-are-resolved/qaq-p/159407

The automation log shows NO ACTION PERFORMED when I complete the only sub-task I created.

I tried sub-task instead of Dev Task as the {{issue.issuetype}}, and {{issue.issuetype.name}} = Dev Task.  (I don't think I tried {{issue.issuetype.name}} = sub-task.)

Note in the screenshots below that my rule branch contains "If:", but the community post rule contains "And:".  How was "And:" obtained?

My rule

My rule.jpg

 

Rule from Community post

Community post rule.jpg

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2023

Hi @Phil Bustin 

Would you please post an image of the audit log details, showing the rule execution?  That may provide more context for this symptom.  Thanks!

Regarding your comment about the "And" in the old screen image (from that post), I believe that is just the evolving UX of the rule editor, over time, changing.

Kind regards,
Bill

Phil Bustin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2023

Rule log.jpg

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2023

Thanks for that information.

I think this is both a smart value name/case-sensitive and default attribute thing.  Please try changing your advanced compare condition to check this:

  • first value: {{issue.issueType.name}}
  • condition: equals
  • second value: Dev Task

And...if that does not help, try writing this to the audit log before the condition to confirm the case/spacing/name of the issue type:

{{issue.issueType.name}}

Phil Bustin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2023

That didn't work; nor did it when I tried it before.  See screen shot below for confirmation.  

I'm not aware of a way of writing to the audit log, but I tried adding it in a comment in a Log work action.  After that the automation showed success twice, although I wasn't aware of that at first, but then showed errors.  It did not transition the parent.  I'm not sure what the comment display signifies, although I think it shows that the issue type name syntax is correct.

success followed by errors.jpg

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2023

I believe that error is from the status name not being wrapped in quotation marks in your related issues condition.  Please try this instead there:

status = "Dev Task Completed"

Phil Bustin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2023

Thanks.  In the meantime, Is the method I used to write to the log what you had in mind?

Phil Bustin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2023

No actions performed.  Also: Why are there 3 logs for this automation?  Is it because the first condition is an undefined When Issue is Transitioned?  And if so, why wouldn't I define the transition, since there can only be one?

8 pm log.jpg

Phil Bustin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2023

Oops!  Success, plus I had the wrong status destination.  All is well.  Thank youRule success log.jpg

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events