Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Adding watcher to subtasks

Hi,

i have the following rule:

- Scheduled

- Create a new Task

-> Branch "for most recentrly created issue"

->-> Create a new Subtask (A)

->-> And: Add Watchers (hans, frank, milo)

-> Branch "for most recentrly created issue"

->-> Create a new Subtask (B)


->-> And: Add Watchers (hans, julia, maria)

-> Branch "for most recentrly created issue"

->-> Create a new Subtask (C)

->-> And: Add Watchers (julia, maria, frank)

You'll get the idea. So for every subtask I have a different group of watcher that needed to be added to the subtask.

Currently Automation adding every Watcher to the "Main Task". It makes sense, but I can't find a different branch that is able to solve this.

Any ideas?

 

 

 

4 answers

1 accepted

3 votes
Answer accepted
Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Feb 09, 2022

I was able to do this in a single rule. The trick is to use one branch to create all the subtasks, and later branch to iterate over the new subtasks.

My rule adds the same watcher to all the subtasks, just to show that can be done.

@Andreas Wollenhaupt, for your case, you'll want conditionals in the second branch to identify each new story. I recommend comparing against the Subtask Summary field. That way you can customize the actions (different sets of watchers) for each Subtask.

Note that it's important to create the variable first BEFORE the branch. I just initialize it to "x". Then, in the first branch, I set it to {{issue.key}} for the newly created Story.

If the variable isn't initialized outside the branch, it will go out of scope at the end of the branch.

rule.png

__________________________________________ 

Audit Log.png

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Feb 09, 2022

Clearly responded before my morning caffeine.  Yes @Mykenna Cepek has the better solution!

Like Mykenna Cepek likes this
Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Feb 09, 2022

@Mark Segall indeed it wasn't fair, as I had one coffee plus a half of a Monster energy drink onboard!

Like # people like this

 

Hi @Mykenna Cepek

What would change if you wanted to create multiple subtasks (let's say 5) and add different watchers to only a few of them (Watcher 1 to subtask 1 and watcher 2 to subtask 2 but no watchers on subtasks 3-5)?

Hi @Mykenna Cepek

What would change if you wanted to create multiple subtasks (let's say 5) and add different watchers to only a few of them (Watcher 1 to subtask 1 and watcher 2 to subtask 2 but no watchers on subtasks 3-5)?

Thanks for the tips. Gonna see what works.

 

Variables only exist in Cloud. :-/ Didn't know there is a difference.

0 votes
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Feb 09, 2022

Hi @Andreas Wollenhaupt 

You'll need to have a second automation rule for this because you would otherwise need a nested branch to dive into the newly created subtask which isn't possible.  The second rule should have the box checked for Allow Rule Trigger to ensure it triggers from the original rule

This one would look something like this:

  • TRIGGER: Issue Created
  • CONDITIONS
    • Issue Type = Subtask 
    • Any other distinguishing characteristics
  • ACTION: Add Watchers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events