Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to Synchronize Watchers Between Parent and Subtasks

Trying to figure out a way to populate any changes in the watchers list of a parent ticket down to all of its subtasks. I'm not finding a trigger for if the watchers list is changed, though. The watchers list doesn't seem to be available. Any ideas?

1 answer

1 accepted

0 votes
Answer accepted

Hi @Kevin Hartley 

It's not possible (as far as I know) to trigger a rule based on watchers being modified. But it is possible to copy Watchers from a parent to its child issues.

You'll need to choose a different trigger. This is how I did it:

  1. Trigger: Scheduled - run the rule once per day. Check "Run a JQL Search". Enter JQL relevant to your need - for example: project = ABC and issuetype in standardIssueTypes() and watcher is NOT EMPTY
  2. Branch: For type of related issues, select Sub-tasks
  3. Action: Manage Watchers - set "Add these watchers" to {{parent.watchers}}, and set "Remove these watchers" to Remove all existing watchers (check the checkbox)
  4. Give the rule and publish it

This rule searches for issues that are not sub-task issue types and have at least one watcher.

The action will remove all existing watchers each time, and refresh them with the current watchers. This action could take place even if the watchers already match. It's important to remove the watchers though, otherwise you're just copying across newly added watchers - and removed watchers would be ignored.

Note:

  • In the Trigger, there is a checkbox to "only include issues which have changed since the last time this rule was executed". You need to uncheck this as adding/removing Watchers does not class as an issue update!
  • This rule could run across a large number of issues depending on the JQL, due to the removal and re-addition of Watchers. I would suggest running this at project-level - this is because global rules have an execution limit per month, based on your hosting type - but project rules have virtually unlimited executions!

Ste

Thanks, I figured I could use some sort of smart value with a daily check. I just wasn't sure if it was parent, or parentIssue or what. Is there a complete list of builtin smart value options, as I don't see parent in the documentation (I could also be overlooking it)? Also, thanks for the tip that adding/removing Watchers not counting as an issue update! Yeah, it looks like it is limited to 1000 issues even at the project level. I just needed to add a clause to the JQL query for issue status for my needs. Also don't want to remove watchers on the subtasks, so didn't include that part. Some subtasks might need specific watchers that the other subtasks and the parent don't need.

Hi @Kevin Hartley 

I'm not sure if there is a complete list of Smart Value options, the pages usually just come with examples!

There are ways to find most fields' smart values - see this page for help on how to do that in future :)

Ste

@Stephen Wright _Elabor8_  Thank you very much for providing this hint on a workaround for the not existing trigger (modification of watchers)

Do you know of an Issue/Feature about the missing trigger to vote on for the roadmap?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Automation

Announcing the Jira automation template library!

Hi all,  After many months of work, I am delighted to announce the launch of the Jira Automation Template Library!  The Template Library is a new website dedicated to all things Jira au...

996 views 17 25
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you