Forums

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

How to remove watchers from tasks

Yash Gupta July 30, 2021

Hi Team,

My task is to delete attachments from closed Jira issues, but when I delete the attachments it notifies the watchers.

Is there a way to remove watchers from the Jira issues before removing the attachments? More than 2.5k issues are there. Removing from UI is not feasible. I am using curl invocations to get the attachment id and delete the attachments.

3 answers

1 accepted

1 vote
Answer accepted
Kishan Sharma
Community Champion
July 30, 2021

If you are using REST API, you need to use the DELETE method on the watchers resource to remove watchers from an issue. Have you tried it ?

Yash Gupta July 31, 2021

@Kishan Sharma but I don't want to lose the contact person for the specific issues. Just wanted to delete the attachments. 

Kishan Sharma
Community Champion
July 31, 2021

May be you can store the watcher in a variable first. Then remove the watcher from the page, delete the attachment, and lastly re-add the watcher (which you have it in variable as a first step)

Like # people like this
0 votes
Jonas Ekström
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.
July 30, 2021

Hi,
If you have the app Automation for Jira, you can automate both the removal of watchers and deletion of attachments.
There are action components for "Manage watchers" and "Delete attachments".
I've got implementations for removal of attachments, and that works like a charm.

Yash Gupta July 30, 2021

Hi @Jonas Ekström, I don't have app automation. 

0 votes
Sreenivasaraju P
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.
July 30, 2021

Hi @Yash Gupta,

Please refer below link

https://jira.atlassian.com/browse/JRASERVER-70354 

This bug is reported with Atlassian. It is still pending.

As suggested in work around, you can try by changing notification schema.

Yash Gupta July 30, 2021

Hi @Sreenivasaraju P , 

Can you please explain what does changing notification schema means and how to use it?

Suggest an answer

Log in or Sign up to answer