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

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
Accepted answer

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")
}

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
Community showcase
Published Wednesday in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

250 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you