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
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there a way to enable/disable outgoing emails via api call?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.