Forums

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

Automation rule: Copy watchers from parent issue when creating sub-issue

Jonas Börnicke
Contributor
June 8, 2020

Hey guys!

I am currently trying to create an automation rule that copies the current watchers from a parent issue when a sub-issue is created. I assume that using smart values and branching it should be possible, but right now this is still over my head.

Thanks for the help! :)

1 answer

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.
June 8, 2020

Hi @Jonas Börnicke -- Welcome to the Atlassian community!

This may be possible, but you will need to do this in stages as there there is no temporary storage/variables in rule execution...and you might need that.  This may work with 2 rules:

Rule 1:

  • Trigger when an issue is created
  • Add a condition to check that it is a sub-task issueType
  • Use a branch to update the parent, adding a comment; perhaps "Update subtask watchers..." with the date time added to the end. Ensure you deselect the option which prevents adding multiple copies of the comment.

Rule 2:

  • Ensure the option is set which allows the rule to be triggered by other rules
  • Trigger when a comment is added by automation user
  • Add a condition to confirm the comment string matches using RegEx 
  • Use a branch to iterate over the subtasks
  • Update the watchers

 

Best regards,

Bill

Jonas Börnicke
Contributor
June 9, 2020

Hey @Bill Sheboy 

thanks for your quick reply!

When using automated comments on the parent to add the watchers, all watchers of the parent task would be notified every time a sub-task is added (and the automated comment is triggered), right? Could get annoying if there are multiple watchers.

Would it be an option to have a scheduled trigger, making the rule check for new sub-task with watchers on parent tasks? Or does this leave us with the same problem of not having any "storage" available?

And instead of using comments (to avoid notifying all other watchers), could "Rule 1" also update a different (possibly) non-visible custom field that would be checked by "Rule 2"?

 

Thanks a lot!

Cheers

Jonas

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.
June 9, 2020

Hi, Jonas.

Good point, and interesting question.  You could use a schedule to reduce impact, or... You could add another condition to exclude sub-tasks which already have watchers, using JQL.  Then they would only get notified for the newly added sub-task watch changes, right?

Of note: if the parent issue's watchers *changed* you would need another set of rules to cascade those to the sub-tasks.

Best regards,

Bill

Akhtaruzzaman SM June 9, 2020

Lets cooperate. started to work!@

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events