Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Bulk Change Watchers

When editing multiple issues via a Bulk Change, the Watchers field is not in the list of editable fields. Is there a way to enable the Watchers field for the Bulk Change operation?

12 answers

1 accepted

0 votes
Answer accepted
itse Atlassian Team Mar 25, 2013

You should be able to bulk change watchers with the following plugin.

https://marketplace.atlassian.com/plugins/com.burningcode.jira.issue.customfields.impl.jira-watcher-field

It adds a custom field type of watchers which you can then create a custom field and add to screens.

Hi Ivan,

You cannot achieve this on JIRA OnDemand, I guess. As this plugin is not available for JIRA OnDemand.

Restricted Functions on Atlassian OnDemand

Atlassian OnDemand Add-ons

This is now possible using jira automation.

You can create a global rule to bulk edit watcher by creating a scheduled rule.

  • Select Trigger : Scheduled .Select run a JQL search and pass results to subsequent conditions and actions. Enter JQL 
  • Then add action  Manage watchers ; there you can select users to add / remove.
  • Save , Enable and Run Rule!


Thanks!

Modern approach that works across platforms.

This is definitely the way to go!

I'm surprised it's the only way, but definitely better than adding a plugin or cobbling together a groovy script.

I have had success bulk changing watchers with the following JQL watcher = currentUser() ORDER BY assignee

But has to be done by each user when they log in as it will has it suggests checks the logged in user... Which is still a pain!

Also tried this watchers >=1 and project = "Call Log Support" or watchers >= 1 AND project is not EMPTY and I was able to see other users as watchers

I'm sure you know already but if the issue is closed you will not be able to remove a watcher, unless you reopen the issue. Also will need rights to be able to manage watchers across each project.

Darren

You can do this for yourself pretty easily OOTB, just create a filter that loads all tickets you want to unwatch, click on Tools > Bulk Change and select Stop Watching.

Unfortunately, this only works if you have the permissions to do bulk change (which I know a lot of people tend to remove for safety reasons).

Can you ONLY change the watcher status for yourself or can you affect the whole watcher list with this method?

Thanks,

Bulk update for watchers is not possible at https://jira.atlassian.com :-(

You can achieve it via API:

import requests
import json

url = 'YOUR_JIRA_ADDRESS/rest/api/2/search?jql=%22Project%22%20%3D%20PROJECTNAME%20and%20%22Watcher%20list%22%20in%20(USERNAME)'
headers = { "Content-Type": "application/json", "Authorization": XXXX}

try:
r = requests.get(url, headers=headers)
except Exception as e:
print(e)

for issue in r.json()["issues"]:
url_remove = 'YOUR_JIRA_ADDRESS/rest/api/2/issue/'+issue["key"]+'/watchers?username=USERNAME'
rem = requests.get(url_remove, headers=headers)

Cannot bulk change watchers across the instance using this plugin only on a issue by issue basis by the looks of it..

We currently use autowatch functionality in our JIRA environment. Unfortunately, with our work, it can make for a ton of 'watched' issues, that we probably don't necessarily need/want and all of the notifications that come with them. This leads us to have to go out and manually 'stop watching' a lot of issues, which is time consuming and annoying. It would be nice if we could remove ourselves as watchers in bulk (at least until I can convince our admins to turn off autowatch!)

Hi all,

I'm using Jira 4.4.4 and I've added 'jira-watcher-field-2.4.1' plugin. How can I add this field to issue bulk editing screen?

Thanks

itse Atlassian Team Mar 02, 2014

Salva, You need to add a new custom field type of "Watcher" then you can perform bulk changes on that specific field.

hi Ivan

I've installed this plugin but I dont know how to asdd this filed to be able see this in bulk edition screen. could you provide me some tops? wpuld be great :)

Thanks Ivan!

Hi all, 

We are using JIRA agile with an on-site implementation and do not have control over the wider organisations rules and plug-ins. 

During a sprint, we assign tickets to a team lead to confirm estimation before starting the sprint. After the tickets have been assigned to team members to begin work, the team lead is still a watcher for all tickets and receives an excessive amount of notifications. 

It would be great to at least be able to filter or arrange by watcher to make bulk changes. 

Thanks,

This can be accomplished using Bulk Edit for oneself or with the ScriptRunner's "Switch User" feature if administering other users as an Admin.

Watcher Bulk Removal Procedure (as currentuser or as any user if an Admin):

  • Add-ons --> Script Runner --> Built-in Scripts --> Switch to a different user 
  • Enter the name of the Watcher to be removed. (ie:  Smith. Jane)
  • Click "Run" --> click  the "here" link to complete the impersonation
  • Click Issues --> Search for Issues --> Advanced
  • Enter this JQL query to display issues of which the Watcher should be removed from:
    • project = XYZ AND resolution = Unresolved AND watcher = smithj
  • Click Tools -->  Bulk Change (applicable # of issues)
  • Click checkbox in header to select all issues --> Click Next
  • Click the "Stop Watching Issues" radio button --> Click Next
  • Click "Confirm" to complete.

Hi Brian. Note that if using the ScriptRunner's "Switch User" feature, the user you switch to must first be given the permissions to bulk EDIT all of the projects the affected issues belong to.

Hi Jason,  you are correct.  My context, albeit not too clear, was referencing a switch to an Administrator named user (ie: Admin) with global Project rights -  so as to denote account changes in issue history as being completed by 'Admin' instead of ones own currentUser account name (ie: John Doe).  Thanks for your comment.

Jira will not allow you to do this, but if you have Jira Workflow Toolkit (JWT) you can add a transition to your workflow that will add a group or project role as watchers of a given issue. This will allow you to bulk-transition any existing issues using the new transition. The transition should go from any state back to itself.

You probably want to define a project role, then also add users in this role as watchers when doing certain other normal transitions.

Suggest an answer

Log in or Sign up to answer
TAGS

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