Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using notifyUsers parameter still fires notifications on /api/2/issue/ PUT

George Pircalabescu June 8, 2018

Hello,

I'm trying to suppress email notifications when calling the REST  /api/2/issue/ PUT endpoint.

"/api/2/issue/" + issue.JiraIssueKey + "?notifyUsers=false"

 But the recipients defined in Issues Notification Scheme -> Events -> Issue Updated as Single User are still receiving the notifications. Is this normal behavior?

Jira version 7.2.x

 

Thanks,

George

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 8, 2018

This was a new feature to Jira 7.2.0.  The feature request for this is in https://jira.atlassian.com/browse/JRASERVER-34423

The REST API documentation for Jira Server 7.2.0 explains the usage of this in some more details, see https://docs.atlassian.com/software/jira/docs/api/REST/7.2.0/#api/2/issue-editIssue

From that page:

notifyUsers

boolean

send the email with notification that the issue was updated to users that watch it. Admin or project admin permissions are required to disable the notification.

Default: true

So I would want to confirm that your user account making this REST call is a Jira Admin or a Project admin.   I am curious if project admins can actually do this in that version of Jira.  Since 7.2 the project admin role has slowly been gaining some more granular levels of project administration that were not previously possible without being a Jira Administrator.

Are all the other notifications in this instance getting suppressed as expected here? 

I am curious if there is something in particular about this specific way to designate notifications in Jira might be a bug.  I have not found any reports of such a bug yet in my searching of https://jira.atlassian.com/issues/ but I am interested to understand this problem further to know if this is working as expected, or there is something else causing a problem here.

George Pircalabescu June 11, 2018

Hey Andrew,

Thanks for your answer.

The user is part of the jira-administrators group and the group is set as ROLE-PROJECT ADMINS on the project. 

I don't know other scenarios of notification suppression so I can't answer to that. 

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 12, 2018

So far I have not been able to reproduce this problem.   I tried to recreate this setup, with a single user set to get notifications on an issue updated event.   I was able to have this address get a notification when editing the issue in Jira, but when I used the rest call, with the 'notifyUsers=false' option, I didn't get the notification for that user account.   I tried this in both Jira 7.2.0 and 7.9.2.

I'm stumped as to why this might be behaving differently in your install.  Do you have any plugins in Jira that might be sending notifications differently than the native mail handler?  Maybe something like email this issue, or the Enterprise Email Handler for Jira (JEMH).  I believe that these plugins to Jira (and possibly others) can circumvent the way Jira is handling the process of outbound notifications that might possible be a factor here.  

If not, then the only other thing I can think of is in regards to the way you're calling that 'notifyUsers=false' option, perhaps there is something wrong with the way it's getting parsed in the script.  If that option is dropped entirely the default of the system is to send the notification, so perhaps there is something wrong with how this endpoint is calling that option.

George Pircalabescu June 13, 2018

I don't think we have any plugins directly related to notifications although we are using a lot of plugins. 

But I noticed another thing, my user was configured as Single User in the Notification Scheme for this project (Project settings -> Notifications -> Issue Updated ) . If I remove my user from the list and add myself as watcher to the issue I don't receive the notifications.

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 14, 2018

I too used the 'Single User' option when I modified my notification scheme for the Issue Updated event.  But I still was not able to reproduce this behavior in my own environment.

SCK October 21, 2021

Hi @Andy Heinzer

Is there a way to enable/disable outgoing emails via api call? 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events