Outbound Slack Connections
Summary
Slack is a cloud-based collaboration tool used to communicate teams. JEMHCloud supports Slack notifications from Issue Events and Post Functions. You will be able to notify your Slack Channels when JEMHC detects an issue change.
Configuring a Slack Connection
In order to send Slack notifications from Issue and Post function events, you need to set up a Slack connection first. The connection knows how to send Slack messages via Slack Rest APIs.
To create a Slack Connection:
Log into your Slack's Team
Go to JEMH Cloud > Slack Connection > Connect To Slack
Authorize JEMHC to be installed to Slack as an App. This allows communication from JEMHCloud to Slack
Check out new Slack Connection on the screen.
Once you have the connection created, you will then need to create a Slack Notification Mapping to drive notification from Issue Created/Updated/Deleted events or Slack Post Functions to send notifications from transition events.
See the following for information about creating a Slack Notification Mapping: Slack Notification mapping
Connection Functions
Once the connection is created there are a few functions that can be operated. These functions are:
Test Configuration
This will test whether there are any issues with the connection. This will display any issues that have been found.
Edit
This will allow you to edit the Slack connection. The current options are:
Name
Alternative offline notifier - This will send a notification when an inbound or outbound email connection is offline.
Delete
This will delete the slack connection. Will need to remove any existing Slack Notification Mappings.
Send Slack notifications from issue events
Like Email and SMS Notification Mapping, Slack Notification Mapping is in charge of sending Slack messages from Issue events through the Slack Connection. For more info see: Slack Notification mapping
Creating a Slack Notification Mapping:
Go to JEMH Cloud → Notifications → Slack → Create
Complete the form, select the nominated projects, select the Slack Connection you want to use and the channel that will receive Slack messages. Enter a velocity script if you want to modify the notification behaviour at runtime (more below).
On Submit, you should see the new Slack mapping
To test the mapping, create an issue in the nominated project and go to Auditing → Events
You should see the issue created event in the queue. When event has been processed, the configured channel in the mapping should have received an Slack message.
The report of the event should confirm the message was sent to a selected Slack channel (e.g.)
Send Slack Notifications from Post Functions
JEMHCloud allows you to send Slack notifications when Issue transitions are performed through JIRA Post Functions.
Adding the Slack Notification Post Function to workflow transition:
Go to right corner Cog → JIRA Administration → Issue → Workflows. Edit the workflow of the project you want to add the Post Function. Click on the transition you want to change and select the Post Functions tab. Click on Add post function
Select Send Slack Notification by JEMHCloud and click Add
Set the Slack Connection, Chanel and Velocity script if necessary. Press Add/Update
Move the Post Function to last position and publish the workflow draft.
Remember to publish the workflow change draft!
To test the post function, go to an issue and perform the transition.
Post function event should appear in JEMH Cloud → Notifications → Events. The event report identifies the channel notified: