My automation to add/remove labels based on epic label is acting strange. What am I doing wrong?

Abby Kiesling May 19, 2023

I’ve set up four automations to handle the following:

  1. when adding the "agent-inbox" label to an epic that already has child tickets → add "agent-inbox" label to all attached child issues

  2. when adding a child ticket to an epic that is already labeled with "agent-inbox" → add "agent-inbox" label to newly attached child issue

  3. when removing the "agent-inbox" label from an epic that already has child tickets → remove "agent-inbox" label to all attached child issues

  4. when removing a child ticket from an epic that is already labeled with agent-inbox → remove agent-inbox label from newly detached child issue

 

Number 4 seems to be my issue.  I can’t isolate the removal automations to trigger ONLY when the "agent-inbox" label is affected. If I remove ANY label from the epic, it is affecting the children.. But in a totally weird way. For example: 

Epic 1 - Label A, Label B

Story a - Label A, Label C

Story b - Label A, Label B

Story c - Label A, Label D

 

EB: When removing label A from Epic, remove Label A from child tickets. When removing label B from Epic, nothing happens with the child ticket labels.  

AB: When removing label A from epic, removes Label A from child tickets.  When removing label B from Epic, it removes label C from story A, label B from story B and label D from story C.  

 

Here's number 3 in case this is what might be interfering:

Screenshot 2023-05-19 at 10.00.54 AM.png 

Screenshot 2023-05-19 at 10.02.06 AM.pngScreenshot 2023-05-19 at 10.02.11 AM.pngScreenshot 2023-05-19 at 10.02.16 AM.png

Here's number 4: 

Screenshot 2023-05-19 at 10.03.36 AM.pngScreenshot 2023-05-19 at 10.03.42 AM.pngScreenshot 2023-05-19 at 10.03.47 AM.pngScreenshot 2023-05-19 at 10.04.02 AM.pngScreenshot 2023-05-19 at 10.04.05 AM.pngScreenshot 2023-05-19 at 10.03.59 AM.png

3 answers

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 19, 2023

Hello @Abby Kiesling 

I think I don't understand your issue. You said your problem is with rule #4 which you state is intended to do the following.

 

when removing a child ticket from an epic that is already labeled with agent-inbox → remove agent-inbox label from newly detached child issue

 

But then in the next paragraph you talk about problems when you remove a label from an Epic. That is not the scenario you described for rule #4. Rule #4 is about removing a child issue from an epic and subsequently removing the label from the child issue.

 

Can you reiterate the scenario you are trying to automate, provide a copy of the rule you created for that scenario, and describe what it actually does that doesn't match your intention?

 

Also, do you have any other rules that are triggered by the same event that triggers the rule that doesn't work as you expect? It could be that multiple rules are triggered by the same event and causing multiple changes.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 19, 2023

Hi @Abby Kiesling 

I watched your video. Thank you for that. 

So, here are a couple of things to check.

1. When you run one of these test cases, removing a label from the Epic and seeing labels incorrectly removed from child issues, then go to the child issue an click on Rule Executions to check the history for Automation Rules that have been run against the issue.

Screen Shot 2023-05-19 at 2.58.26 PM.png

 

Screen Shot 2023-05-19 at 3.00.07 PM.png

 

That will help you determine exactly which rule(s) have caused changes to the issue. 

2. Go to the Rule that has caused the change and look at the Audit Log. Click on the Show More link next to the entry for the execution of the rule. Share those details with us.

Screen Shot 2023-05-19 at 3.01.56 PM.png

 

3. The condition you have for Labels equals in any order agent-inbox is not helping your rule. If you want this rule to run only when the that label is deleted, then that condition will halt the rule from running. That condition is not checking to see if agent-inbox is the label that was removed. That condition is checking to see if the trigger issue currently has the agent-inbox label. If you removed the label, then it will no longer be present and the rule will stop executing.

 

Get back to us with the Audit Log information and we can continue debugging the problem.

0 votes
Abby Kiesling May 26, 2023

Ok so I made a lot of changes and I got everything working as expected.  I am still having an issue where one rule works the first time, and then fails the second -- with audit log saying success.. It's super strange.  I'm going to submit a ticket for this one, because it's working on the first try (replicable when I wait for a bit to make a new ticket), so I don't think there's anything wrong with my automations.  I think this is a true bug. 

 

Thanks for your help!

0 votes
Abby Kiesling May 19, 2023

Whoops, you're right.  It's number 3 in my text above.  I believe it's fourth on my automation list, so I mixed them up.  Sorry about that.  

 

Here's a video recording of the scenario: https://vimeo.com/828047531/4ca39b8289?share=copy 

Suggest an answer

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

Atlassian Community Events