Skip to content

Function: notify() ​

ts
function notify(
   client, 
   parameters, 
   options?
): Promise<void>;

Defined in: src/cloud/api/issues.ts:673

Creates an email notification for an issue and adds it to the mail queue.

Permissions required:

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ htmlBody?: string; issueIdOrKey: string; restrict?: { groupIds?: string[]; groups?: object[]; permissions?: object[]; }; subject?: string; textBody?: string; to?: { assignee?: boolean; groupIds?: string[]; groups?: object[]; reporter?: boolean; users?: object[]; voters?: boolean; watchers?: boolean; }; }-
parameters.htmlBody?stringThe HTML body of the email notification for the issue.
parameters.issueIdOrKey?stringID or key of the issue that the notification is sent for.
parameters.restrict?{ groupIds?: string[]; groups?: object[]; permissions?: object[]; }-
parameters.restrict.groupIds?string[]List of groupId memberships required to receive the notification.
parameters.restrict.groups?object[]List of group memberships required to receive the notification.
parameters.restrict.permissions?object[]List of permissions required to receive the notification.
parameters.subject?stringThe subject of the email notification for the issue. If this is not specified, then the subject is set to the issue key and summary.
parameters.textBody?stringThe plain text body of the email notification for the issue.
parameters.to?{ assignee?: boolean; groupIds?: string[]; groups?: object[]; reporter?: boolean; users?: object[]; voters?: boolean; watchers?: boolean; }-
parameters.to.assignee?booleanWhether the notification should be sent to the issue's assignees.
parameters.to.groupIds?string[]List of groupIds to receive the notification.
parameters.to.groups?object[]List of groups to receive the notification.
parameters.to.reporter?booleanWhether the notification should be sent to the issue's reporter.
parameters.to.users?object[]List of users to receive the notification.
parameters.to.voters?booleanWhether the notification should be sent to the issue's voters.
parameters.to.watchers?booleanWhether the notification should be sent to the issue's watchers.
options?RequestOptions-

Returns ​

Promise<void>