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
Dieter Community Champion Nov 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")
}

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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,847 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot