Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automation Rule - How to remove watchers for epic-linked issues which were cloned with its Epic?

Tilman Ulshoefer
Contributor
May 14, 2024

Dear everyone,


I have a rule where I clone an Epic, including the epic-linked issues. I successfully remove the watcher from the cloned Epic, using the branch "For All created issues". 

How do I configure the rule correctly, so that the watchers are also removed from the cloned epic-linked issues? Why does the branch in the screenshot not remove the watchers from the cloned epic-linked issues as well, as its name implies? I tried a lot of things and still fail.

2024-05-14_14-05-39.png

3 answers

1 vote
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.
May 14, 2024

Hi @Tilman Ulshoefer 

Yes, and...to Kalyan's suggestions:

Branches which could be on more-than-one-thing are run in parallel and asynchronously, with no guarantee of when the branch will finish...up until the last step of the rule.  This design helps quite a bit with rule performance, and requires us to think differently when writing rules :^)

In your rule's branch to Stories or other issues in the Epic, all of those loops of processing happen independently of the main rule path; same thing with the later branch on All created issues.  And so the child issue clones are not visible outside of the branch for any use in the recently created issues branch. 

Worse still, I hypothesize the second branch in your rule is likely to finish before all of the issues are cloned!

There are a few workarounds for this scenario, depending upon if you want to remove all watchers, or some of them, from the clones...

  • Remove all watchers
    • Rather than using the clone issue action, use create issue and only include the needed fields when copying.  Then no removal of watchers is needed.
  • Remove some watchers
    • Use a second rule, triggered on issue created, which detects cloning and selectively remove watchers.

Kind regards,
Bill

Tilman Ulshoefer
Contributor
May 15, 2024

Thank you Bill, you helped me a lot to find the solution now:
 
A scheduled event running every morning, where I select all issues with a certain text in the summary field, and then to remove specific watchers.

Why this solution?

  • I did not find out how to create an issue and copy field values from a source Epic plus its epic-linked issues
  • Having a second, separate rule, triggered with "Issue Created" or "Multiple issue events" did not work. The rule does not run, meaning, the previous Clone Rule does not trigger an Issue Created event!
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.
May 15, 2024

Well done; please remember to fully test your rule to confirm it works as expected.

Regarding the challenges you encountered...

For the first concern, one approach is saving data which is needed later and using the correct smart values.  For example, by saving the newly cloned Epic's key in a variable for later use from {{createdIssue.key}}

For the second one, by default the actions of one rule cannot trigger another rule.  This prevents unintended consequences and run-away looping errors.  When you actually want the actions of one rule (e.g., create an issue) to trigger another rule, the downstream rule can enable the option "Allow Rule Trigger" in the details at the top.  Use caution with this option to confirm it does not cause problems.

1 vote
Kalyan Sattaluri
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.
May 14, 2024

Hello @Tilman Ulshoefer 

What you are seeing is expected behavior.

The last branch where you are removing watchers..

  • will remove the watcher from from the Epic created right after your If statement
  • will NOT remove watcher from stories created in an earlier branch.

Because the  "created issues from previous steps in the rule" branch, your last step, has no visibility on stories created in your earlier branch, except the issues created as part of the main rule.

Instead, you should have the "Remove watchers" statement right after you are cloning the issues so you dont even need this last branch.

Finally, you maybe aware, but stating it for clarity, if you want to clone an epic, including its stories, that is, create a new epic and new set of stories underneath it, your current rule is not doing that. Yes, you are creating a new epic, but you are cloning stories under old epic. 

Tilman Ulshoefer
Contributor
May 14, 2024

Thank you for your advice, Kalyan,.

Unfortunately, moving remove watchers into the branch leads to removing the watchers from the source epic. And having the remove watchers at the last step at least removes them from the cloned Epic (I removed the last branch, remove watchers work fine for the Epic without this branch).

The questions with the cloned epic-link issues persists, therefore, I will now try out what Bill suggests.

BTW: the epic-linked issues are nicely cloned and associated to the cloned Epic, that works fine.

0 votes
Jack Brickey
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 14, 2024

Hi @Tilman Ulshoefer ,

You should move that last branch under the previous branch right after the clone issues action under the first branch. You may need to add a "refetch data" after clone action.

Tilman Ulshoefer
Contributor
May 14, 2024

Thank you for your advice, Jack.

Unfortunately, moving (including refetch) remove watchers into the branch and also, right after the main one (then: clone...) leads to removing the watchers from the source epic and issues, not the cloned ones.

I will now try out what Bill suggests.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events