Display message to user

This workflow post-function displays a message to the user triggering the transaction. This message displays as a box in the top right corner of the issue view page or Jira Software board (Figure 1, right).

The displayed message can be customized using the options in the post-function configuration, including dynamically generating the message title and content using Groovy templates.

Note: This post-function will not work to display messages on Jira Service Desk customer portals. 

You are viewing the documentation for Jira Data Center / Server.

On This Page

Figure 1 - Message flag

Configure the post-function

  1. Follow the steps above to add a post-function to a Transition.

  2. From the list of post-functions, select Display message to user.

  3. Click Add.

  4. The Display Message to User page will open (Figure 2, right). Configure the post-function as needed, setting the options for message title and body, as well as message type, auto closing, and action link. See below for details on each of the configuration options.

  5. Click Add.

Message Title and Body

The message title and body options configure the primary content of the message box.

  • Message title - Enter a static value or a Groovy expression to set the title of the message.

  • Message body - Enter an HTML text to set the message body, including optional Groovy expressions for dynamic content.

Options

  • Message type - Select the type of message box to display. It can be one of Info, Success, Warning or Error, and it will control the icon displayed in front of the message.

  • Auto close - Select this option if you want the message box to disappear automatically after a few seconds.

Action link

An action link is a clickable link that is added to the message box. An action link can navigate to another issue or to an arbitrary URL.

Note: You cannot add an action link to a message that is configured to auto close!

  • Add action link - Select this checkbox to add an action link to the message.

  • Action mode - Select one of the following:

    • Single action - Select to add one action link to the message.

    • Multiple actions - Select to add multiple action links to the message using a Groovy expression.

  • Action title - Only available when Action mode, above, is set to Single action. Enter the title of the action link that will be displayed at the bottom of the message.

  • Action type - Only available when Action mode, above, is set to Single action. Select the type of action to be performed.

    • Navigate to URL - Input a valid URL or a Groovy expression that returns a valid URL. For example:

      https://www.innovalog.com
    • Navigate to another issue - Input a Groovy expression that returns an issue key. For example:

      "TEST-1"
    • Trigger a transition - Add a link that will trigger a transition. When clicked, the link will execute the first available transition from the list you specify.

  • URL - Only available when Action type, above, above, is set to Navigate to URL.

  • Issue key - Only available when Action type, above, above, is set to Navigate to another issue.

  • Transition(s) - Only available when Action type, above, above, is set to Trigger a transition.

  • When user clicks - Only available when Action type, above, above, is set to Navigate to URL or Navigate to another issue. Select this option to open the link or issue in a new window/tab.

  • Multi actions script - Only available when Action mode, above, above, is set to Multiple actions. A Groovy expression that returns a Collection of com.innovalog.groovy.messaging.MessageAction objects. The MessageAction constructor expects the following parameters:

    • title - a String representing the action title, which appears as a link

    • type - One of the following:

      • MessageAction.ActionType.GOTO_ISSUE to link to a Jira issue

      • MessageAction.ActionType.GOTO_URL to link to a page

      • MessageAction.ActionType.TRANSITION_ISSUE to trigger a transition

    • param - One of the following:

      • For GOTO_ISSUE, an issue key value

      • For GOTO_URL, a URL

      • For TRNASITION_ISSUE, a transition ID

    • newWindow - pass true to open the link in a new window or tab, false to replace the current page

For example:

import com.innovalog.groovy.messaging.MessageAction [ new MessageAction("Action name", MessageAction.ActionType.GOTO_URL, "URL", true), new MessageAction("Action name", MessageAction.ActionType.GOTO_ISSUE, "Issue Key", true) ]

Conditional execution

Error Handling

Â