Is is possible to disable subscription emails but leave notificaiton emails active (for a test installation)?

Dave Forgac November 17, 2011

We have a production and test Jira environment installed. The test environment uses a copy of the production database therefore all of the users' notification settings are the same. We would like to disable subscription emails so people aren't getting those daily but would like to leave ticket update notifications active.

There is a section in bin/senenv.sh that allows you to disable all emails (-Datlassian.mail.senddisabled=true). Is similar possible for just subscriptions?

1 answer

1 accepted

5 votes
Answer accepted
Dieter
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.
November 18, 2011

I'm not aware of any system property that can directly control subscription emails. To achieve the desired result you might remove all subscriptions on your test system. This is how i do it in the Groovy Script Runner plugin:

import com.atlassian.jira.ComponentManager

import com.atlassian.jira.issue.subscription.*

sm = ComponentManager.getComponentInstanceOfType(SubscriptionManager.class)
subscriptions = sm.getAllSubscriptions();
subscriptions.each () {
sm.deleteSubscription it.getLong("id")
}

Parashar Joshi
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.
June 14, 2017

Updated for Jira 7.X. Tested on 7.2.9

import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.subscription.SubscriptionManager

SubscriptionManager sm = ComponentManager.getComponentInstanceOfType(SubscriptionManager.class)
def subscriptions = sm.getAllFilterSubscriptions()
 subscriptions.each () {
 sm.deleteSubscription it.getId()
}

Thanks,
Parashar

Suggest an answer

Log in or Sign up to answer