Remove multiple inactive watchers from issues?

Hi,

 

I want to remove all inactive watchers from all issues but cant really find a way to do this.

The filter below is possible to use to show all issues that has inactive users but I cant find a way to remove the inactive users from the issues:

watcher in inactiveUsers()

 

Does anyone have a clue how to do it? 

 

Thanks in advance,

 

Best regards,

Johan Söderström

 

1 answer

This widget could not be displayed.
Josh Steckler Community Champion Oct 03, 2017

Hello Johan,

What is the problem you are trying to solve by removing inactive watchers?

Just clutter? Because inactive users should not be receiving emails even if they're a watcher (and notification schemes are set up properly).

The only way I could think of to do this would be to script it using the REST API. You'd have to search for relevant issues, then get the list of watchers for each (individually), then remove the inactives. This would be a fairly intensive script depending on the number of issues. I wouldn't recommend doing this.

https://docs.atlassian.com/jira/REST/7.4.3/#api/2/search

https://docs.atlassian.com/jira/REST/7.4.3/#api/2/issue-getIssueWatchers

https://docs.atlassian.com/jira/REST/7.4.3/#api/2/issue-removeWatcher

@Josh Steckler - Thank you for your answer.

 

The problem was actually that inactive users recieved notifications because they were watchers. The reason was that we had nestled groups so even if the user were inactive the application access were somehow open. After removing all groups from the user the problem was solved.

Thanks once again.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 06, 2018 in Jira Service Desk

A is for Activate: Share your top Jira Service Desk onboarding tips for new users!

Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :).  In the spirit of this month's  august-challenge, we're sourcing stories of Jira Service Desk activation fro...

528 views 23 15
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you