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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,552,123
Community Members
 
Community Events
184
Community Groups

How to disable issue filter subscriptions for all users

Tayyab Bashir
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.
Feb 02, 2016

Hi, 

I have a Test instance of JIRA on which I am doing some testing and need emails to be enabled.

But there are many filter subscriptions on it from many users (as its the XML backup of production server).
Is there a way to disable JUST the issue filter subscriptions and keep everything else intact? 

Thanks 

2 answers

francis
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Oct 04, 2020

Nice one @Koen Gillard 

1 vote
Vasiliy Zverev
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.
Feb 02, 2016

You can diable out mail at all: admin panel => system => mail => out mail => press button disable

Tayyab Bashir
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.
Feb 02, 2016

Hi, 
I don't want to disable all the emails, I want to disable just the filter subscriptions. 

Vasiliy Zverev
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.
Feb 02, 2016

Then you can try execute this code to delete all subsriptions (for example, via Script Runner)

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.subscription.FilterSubscription
import com.atlassian.jira.issue.subscription.SubscriptionManager

SubscriptionManager subscriptionManager = ComponentAccessor.getSubscriptionManager();
for(FilterSubscription subscription: subscriptionManager.getAllFilterSubscriptions()){
    subscriptionManager.deleteSubscription(subscription.getId())
}

DO NOT EXECUTE IT ON PROD INSTANCE

Like # people like this
Tayyab Bashir
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.
Feb 03, 2016

This didn't do anything? 

Vasiliy Zverev
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.
Feb 03, 2016

It should to delete all subsriptions.

Tayyab Bashir
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.
Feb 03, 2016

It does run but it doesn't delete the filters. I tried re-indexing as well. 

Capture.PNG

 

FYI: JIRA Version: 7.0.5

Vasiliy Zverev
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.
Feb 04, 2016

This script does not delete filters, only subsription. 

You can get all subscriptions with this one:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.subscription.FilterSubscription
import com.atlassian.jira.issue.subscription.SubscriptionManager

StringBuilder result = new StringBuilder();
SubscriptionManager subscriptionManager = ComponentAccessor.getSubscriptionManager();
for(FilterSubscription subscription: subscriptionManager.getAllFilterSubscriptions()){
    result.append("{ " + subscription.getLastRunTime().toString() + " / " + subscription.getFilterId() + " }")
}

return result.toString()
Like Asaf_Porat likes this
Tayyab Bashir
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.
Feb 04, 2016

JIRA Version: 6.0

Gave error when I tried to run the script.

Tayyab Bashir
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.
Feb 04, 2016

Capture.PNG

JIRA Version: 6.0

Gave error when I tried to run the script.

Vasiliy Zverev
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.
Feb 04, 2016

Hm, this code will work only 6.2+.

Since try this SQL to get all subscriptions:

Select
    filtersubscription.*
    , searchrequest.*
from
    filtersubscription
    left join   searchrequest   on  filtersubscription.FILTER_I_D = searchrequest.ID

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events