ScriptRunner Suppress Email on Escalation Service

I have a custom escalation service that is calculating and setting a custom field using a issueInputParameters.addCustomFieldValue() call. The script runs every 30 minutes and I would like to avoid sending an email every time it runs.  Is there any way to update the field(s) without sending the update email?

1 answer

1 accepted

0 vote
Steven Behnke Community Champion Nov 06, 2017

Do you call IssueService.update(ApplicationUser user, IssueInputParameters input) yourself? If so, instead use IssueService.update(Applicationuser user, IssueInputParameters input, EventDispatchOption.DO_NOT_DISPATCH, boolean false)


If you aren't calling IssueService.Update yourself, then you'll have to handle all the calls to issueservice and issueinputparameters yourself. 

Thanks that did it.  Here is the generic code syntax I used:

import com.atlassian.jira.bc.issue.IssueService
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.IssueInputParameters
import com.atlassian.jira.issue.customfields.manager.OptionsManager

IssueService issueService = ComponentAccessor.getComponent(IssueService);
def customFieldManager = ComponentAccessor.getComponent(CustomFieldManager);
def optionsManager = ComponentAccessor.getComponent(OptionsManager);
IssueInputParameters issueInputParameters = issueService.newIssueInputParameters()

def user = ComponentAccessor.getJiraAuthenticationContext().loggedInUser
def issue = issue;
def cfPI = customFieldManager.getCustomFieldObjects(issue).find { == "Priority Index"};
issueInputParameters.addCustomFieldValue(, 10.toString());

def update = issueService.validateUpdate(user,, issueInputParameters)
issueService.update(user, update, com.atlassian.jira.event.type.EventDispatchOption.DO_NOT_DISPATCH, true);
Steven Behnke Community Champion Nov 16, 2017

Happy to help! :)

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

685 views 6 13
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