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
Nice one @Koen Gillard
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can diable out mail at all: admin panel => system => mail => out mail => press button disable
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I don't want to disable all the emails, I want to disable just the filter subscriptions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This didn't do anything?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It should to delete all subsriptions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It does run but it doesn't delete the filters. I tried re-indexing as well.
Capture.PNG
FYI: JIRA Version: 7.0.5
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
JIRA Version: 6.0
Gave error when I tried to run the script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Capture.PNG
JIRA Version: 6.0
Gave error when I tried to run the script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.