SMS
Summary
Like Email Notification Mappings, the SMS notification mapping is in charge of sending SMS messages from Issue events through the SMS Transport. Within these Notification mappings you can select the Phone Numbers that should be notified.
Creating a SMS Notification Mapping
Go to JEMH Cloud > Notifications > SMS > Create
Complete the form, select the nominated projects, select the SMS transport you want to use and the phone numbers (CSV) that will receive these SMS messages.
On Submit, you should see the new SMS mapping
SMS Notification Mapping configuration options:
Name
The Name of the Notification Mapping.
Enabled
Defines whether the Notification Mapping can be used.
Projects
This defines the Projects that the Notification Mapping will send notifications for. This can be either for the selected Projects or for all Projects.
Issue Created
The Template that is used to render Issue Created Notifications
Issue Updated
The Template that is used to render Issue Updated Notifications
Issue Deleted
The Template that is used to render Issue Deleted Notifications
SMS Transport
Defines the SMS transport in charge of sending these SMS messages.
To Phone Numbers
This is a CSV list of phone numbers that will receive SMS notifications
JQL Whitelist
This is a optional JQL filter. Only Issues matching this JQL expressions will receive notifications. E.g. issuetype = Bug' will only send bug notifications.
Velocity Script
This allows for custom conditions that will affect the sending of the notifications. For example inhibiting notifications or changing one of the parameters like the phone numbers. See below for some Example Velocity Scripts.
Example Velocity Scripts
SMS notification behaviour can be changed at runtime with a user-defined Velocity Script. The script can use the event data or be time based to change how notifications are performed.
Reset/Add Phone Numbers
Change to phone number when Critical
#if ($context.issue.fields.priority.name.textValue() != 'Critical') ## if issue priority is critical
$smsNotificationUtils.resetToPhoneNumbers() ## remove existing phone numbers for current notification
$smsNotificationUtils.addToPhoneNumber("+1234567") ## add phone number to current notification
#end
|
Restrict notifications to specific time ranges
Notify only after hours
#if (!$dateTimeUtils.betweenHours("18:00", "06:00")) ## during specific hours
$smsNotificationUtils.inhibitNotification() ## prevent current SMS notification
#end
|
Restrict by priority
#if ($context.issue.fields.priority.name.textValue() != 'Blocker') ## if issue priority is not a blocker
$smsNotificationUtils.inhibitNotification() ## prevent current SMS notification
#end
Velocity Script cannot be validated at configuration time (for example the dynamic phone numbers). You should test the script by re-executing events in Auditing > Events