The SMS transport is used for notifying users of JIRA events through SMS.
The current supported SMS gateway providers are:
For each provider the requirement parameters are different. Below is a table of the supported providers and the required parameters for successful configuration. More information on these parameters can be found in the respective providers documentation.
SMS Provider | Required Parameters | Documentation Reference |
---|---|---|
Twilio |
| https://www.twilio.com/docs/api/rest/sending-messages |
BulkSMS |
| http://developer.bulksms.com/eapi/submission/send_sms/ |
Nexmo |
| https://docs.nexmo.com/messaging/sms-api/api-reference |
Clockwork |
| https://www.clockworksms.com/doc/easy-stuff/http-interface/send-sms/ |
Each provider charge differently, please refer to their FAQ and pricing policies. |
In order to send SMS notifications from Issue and Post function events, you need to set up a SMS transport first. The transport is the connection that knows how to send SMS messages through a SMS provider.
To create a SMS transport:
Once you have the transport created, you can set SMS Notification Mappings to send SMS notifications from Issue Created/Updated/Deleted events or SMS Post Functions to send SMS notifications from transition events.
Like Email Notification Mappings, the SMS notification mapping is in charge of sending SMS messages from Issue events through the SMS Transport.
Creating an SMS Notification Mapping:
JEMHCloud allows you to send SMS notifications when Issue transitions are performed through JIRA Post Functions.
Adding the SMS Notification Post Function to workflow transition:
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.
#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 |
#if (!$dateTimeUtils.betweenHours("18:00", "06:00")) ## during specific hours $smsNotificationUtils.inhibitNotification() ## prevent current SMS notification #end |
#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 |
SMS messages are limited (in size and pricing) so JEMHC may not notify issue updates out of the box. Also you wouldn't want to spam your SMS users for every change in an issue. You can confirm that an issue updated event has been ignored (no SMS) if you see the line SMS message to phone numbers '+555123456' has not been sent as no useful information was displayed in the events report (Auditing → Events → Cog Icon → Report).
In order to send SMS messages from issue update, you would need to create a custom template containing the logic around which fields and in which conditions the SMS message must be sent. An example:
In this example, the interested field is Priority and the condition is new value=Blocker. These are the steps to create and set an SMS Issue Updated template:
#renderMessage()#if ($jemhUtils.isCreateOrInChangeLog($context, 'priority') && $context.issue.fields.priority.name.textValue()=='Blocker'). New Priority: $context.issue.fields.priority.name.textValue() $jemhUtils.setFieldRendered() #end |
You can add more fields and values by updating the template. For example the script:
Will send an SMS if the issue priority has been changed to 'Blocker' or 'Highest' or if the issue status has also been changed. Please note that the new lines are missing in the script so the SMS message doesn't have them. |
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.
|