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?
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.
__________________________________________
Clearly responded before my morning caffeine. Yes @Mykenna Cepek has the better solution!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mark Segall indeed it wasn't fair, as I had one coffee plus a half of a Monster energy drink onboard!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the tips. Gonna see what works.
Variables only exist in Cloud. :-/ Didn't know there is a difference.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.