Forums

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

Add watcher when ticket created or updated (based on component items)

Rick Dorgan April 16, 2025

I would like to add watchers to sub-tasks and stories based on my component selection, and would like to achieve this in the following scenarios:

Scenario 1: I am using a manually triggered rule (see screenshot) to create sub-tasks and remove myself as a watcher of those sub-tasks. This rule copies components from the Story to the new sub-task. I would like to add watchers based on component selection: Component A / assign Watcher X, Component B / Assign Watcher Y.

Scenario 2: Component selection is made to the Story AFTER the manually triggered sub-task creation. I have a separate rule that mirrors this component selection to the sub-task. Just like scenario 1, I would like to add watchers based on component selection: Component A / assign Watcher X, Component B / Assign watcher Y.

Can someone point me in the right direction? I can get it to work as a separate rule at the Story level, but the same rule details applied to this manually triggered sub-task creation fail.

@Bill Sheboy- you helped removing me as a watcher in a separate thread, and thought you might be able to assist here as well. Thanks in advance.

Screenshot 2025-04-16 at 10.35.55 AM.png

 

2 answers

0 votes
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.
April 16, 2025

Hi @Rick Dorgan 

Unfortunately, the Data Center version does not have lookup tables yet...which would make this scenario easier.  Until then, I can think of two ways to do what you ask: conditions and conditions + variables.

 

Conditions: use branching and conditions to add the watchers, one by one.  This is the slower method as it updates the issue multiple times.

  • action: create the subtask
  • branch: to most recently created issue
    • condition: some test on component (either the created one or the trigger)
    • action: add watcher X
  • branch: to most recently created issue
    • condition: a different test on component (either the created one or the trigger)
    • action: add watcher Y

 

Conditions + variables: use conditions to repeated add watchers to a list, and then add them all at once from a list

  • action: create the subtask
  • action: create a variable to hold the watchers
    • name: varWatcherList
    • value: NONE,
  • if / else block
    • condition: some test on component
    • action: create variable, concatenate onto the variable
      • name: varWatcherList
      • value: {{varWatcherList}},watcher X
  • NEW if / else block
    • condition: some different test on component
    • action: create variable, to update it again...
  • branch: to most recently created issue
    • manage watchers, adding this value
      • {{varWatcherList.remove("NONE,").split(",")}}

 

Kind regards,
Bill

Rick Dorgan April 17, 2025

Thanks, Bill! I will try these approaches out and let you know how it goes.

Like Bill Sheboy likes this
0 votes
Manoj Gangwar
Community Champion
April 16, 2025

Hi @Rick Dorgan, You are creating the sub-task and have not defined the Parent under which parent you want to create it.

 I would suggest that you add a Branch (the most recently created issue) and then under that create a sub-task.

Rick Dorgan April 16, 2025

Hi Manoj. The rule is currently working as intended. I would like to add to it based on the details of Scenario 1 and 2.

Suggest an answer

Log in or Sign up to answer