Forums

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

Auto Remove a Watcher as soon as the issue is created

Elif Alverson
Contributor
January 20, 2023

Hello, 

We have an API which creates Jira issues and then adds a SA (Service Account) as the watcher as well as the reporter. How can I create an automation to block the SA to be added as the watcher since lots of people receives email updates due to this. 

 

Thank you.

2 answers

1 accepted

3 votes
Answer accepted
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.
January 20, 2023

Hi @Elif Alverson 

One way to do this is to modify your REST API to not add the user as a watcher during creation.

The next way is to create an automation rule to remove the watcher once the issue is created:

  • trigger: issue created
  • action: re-fetch issue
  • action: manage watchers, and remove the user

Kind regards,
Bill

Elif Alverson
Contributor
January 23, 2023

@Bill Sheboy , thank you so much for your response. I am testing the second way you suggested. Could you please assist me with adding multiple actions to this automation? I would like to remove a specific watcher ; 

1- When the issue is created

2-When the issue is transitioned

3-When the issue is updated

4-When the issue is commented

 

Is it possible to have one automation , or does this require 4 automations? Thank you so much for your help and understanding. 

 

Screenshot 2023-01-23 at 10.31.31 AM.png

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.
January 25, 2023

With the Jira Cloud version of automation, I do not believe it is possible yet to select those different triggers together.

One work-around is to have separate rules for each of the relevant triggering conditions.

Like Elif Alverson likes this
Elif Alverson
Contributor
January 25, 2023

Thank you.

0 votes
Rick Dorgan April 8, 2025

@Bill Sheboy- I created an automation rule (Jira Server) and can't seem to remove myself as a watcher. The rule is manually triggered, and creates a sub-task. Screenshot attached. I can remove myself from the story using the additional action...but not the sub-task. Any thoughts? Screenshot 2025-04-08 at 3.21.35 PM.png

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 8, 2025

Hi @Rick Dorgan 

First thing: this is a very old thread, and I recommend creating a new question, perhaps including a link back to this one.  That will ensure the maximum number of people see it to offer suggestions.  Thanks!

As for your specific question, this is about issue-scope in the rule as that determines what a rule action will act upon.  The fix for your scenario is to branch to the most-recently-created issue when you want to change it.  To do this, remove the branch for current issue (as well as the re-fetch action as it is not needed).

For example:

  • trigger: manual
  • action: remove watcher (from the trigger issue)
  • action: create the subtask
  • branch: to most recently created issue
    • action: remove watcher (now from the subtask)

 

In my experience, the branch for current issue is typically only needed for one case: to use a single condition and keep the rule processing the remaining steps without using if / else.

For example (and unrelated to your actual question :^)

  • trigger: some trigger...
  • branch: for current issue
    • condition: check something
    • action: do something
    • action: re-fetch issue (only include this when the action above was an edit of the trigger issue)
  • branch: for current issue
    • condition: check something else
    • action: do something else
    • action: re-fetch issue (only include this when the action above was an edit of the trigger issue)
  • ...

 

Kind regards,
Bill

Rick Dorgan April 9, 2025

Thanks, Bill. Your example worked great, and simplified the steps in my rule. Appreciate the quick reply. Next time I'll be sure to open a new post.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events