Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Status
subtletrue
titlesince 3.0.3

...

Slack will generate a Webhook URL for the integration. Copy this URL as you will need it shortly. At this point you can also customize the name, description and icon used by the integration. Save changes when done.

...

Jira Allowlist : Wildcard Expression

If you enable the Jira allow list, the webhook URL supplied by Slack needs to be added, for example:

Code Block
https://hooks.slack.com/*

Issue Event driven Slack notification

Go JEMH > Notifications and select the Slack transport tab. Click New Transport Config.

...

Now, when an issue event is fired for the project (and that event type has a template selected), the configured Slack channel will receive a message for it.

...

...

If you enable the Jira allow list, the webhook URL supplied by Slack needs to be added, for example:

...

PostFunction Slack notification

The slack postfunction needs content that is in a JSON format. The Slack IssueEvent templates can be used as a basis, pasted as custom content, eg:

Code Block
#set ($user = "<${baseurl}/secure/ViewProfile.jspa?name=$!actionUser.getUsername()|$!actionUser.getDisplayName()>")
#set ($linkedissue = "<${baseurl}/browse/${issue.getKey()}|$!issue.getKey()>")
#set ($title = $i18n.getText("email.event.activity.commented.issue", $user, "*", "*", $linkedissue))
#set ($simple = $i18n.getText("email.event.activity.commented.issue", $!actionUser.getDisplayName(), "", "", $!issue.getKey()))
{
  "text": "$simple",
  "blocks": [
    {
      "type": "divider"
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "$title"
      }
    },
    {
      "type": "section",
      "block_id": "section1",
      "text": {
        "type": "mrkdwn",
        "text": "<${baseurl}/browse/${issue.getKey()}|$!issue.getSummary()>"
      }
    },
    {
      "type": "section",
      "block_id": "section2",
      "text": {
        "type": "mrkdwn",
        "text": " Your text here > < & & "
      }
    }
  ]
}

(info) Currently, a bug

Jira Legacy
serverSystem JIRA
serverId31e1f342-5dce-3979-a43c-85899d565476
keyJEMH-7959
is preventing a custom slack transport TemplateSet being selectable in the Postfunction config where a custom slack transport is selected, that will be fixed in due course.