Our new Appfire Documentation Space is now live!

Take a look here! If you have any questions please email support@appfire.com

Display message to user

Are you using JMWE for Cloud and want to learn how to use this post-function? Head to our documentation here.

 

A workflow post-function that displays a message to the user triggering the transaction, as a “flag” in the top right corner of the issue view page or Jira Software board. This will not work on Jira Service Desk customer portals. 

The displayed message can be customized using the options (explained below) in the post-function configuration. Here is a sample message on the issue view. 

To add the 'Display message to user" post-function to a transition:

  1. Click Edit for the workflow that has the transition you wish to configure the post-function on.

  2. In the Workflow Designer, select the transition.

  3. Click Post Functionsin the properties panel.

  4. Click Add post function.

  5. Select Display message to user (JMWE app) from the list of post-functions. You are navigated to the Display Message to User Post-function screen.

  6. Add the configuration details as specified in the Configuration details section.

  7. Click Add to add the post-function to the transition.

  8. Publish the workflow.

When you add this post-function to a transition and trigger the transition, a message is displayed to the user triggering the transaction, as a “flag” in the top right corner of the issue view page. You can customize the post-function using the following options:

Configuration details

Add the following details to configure the post-function to fit your scenario:

  • Message title: Enter a Groovy expression to set the title of the message.

  • Message body: Enter an HTML text to set the message body including optional Groovy expression.

  • Options

    • Message type: Select the type of message box ("flag") to display. It can be one of "Info", "Success", "Warning" and "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
    You can add an action link to the message which, when clicked, can navigate to another issue or to an arbitrary URL.

    • 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.

        • Action title: Enter the title of the action link that will be displayed at the bottom of the message.

        • Action type: Select the type of action to be performed.
          Navigate to URL: Input a text that represents 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"
        • When user clicks: Select this option to open the link or issue in a new window/tab.

      • Multiple actions: Select to add multiple action links to the message using the Groovy expression entered in:

        • Multi actions script:
          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 - either MessageAction.ActionType.GOTO_ISSUE, to link to a Jira issue, or MessageAction.ActionType.GOTO_URL, to link to a page

          • param - either be a Jira issue key or a page URL

          • newWindow - pass true to open the link in a new window or tab, false to replace the current page
            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
    Only if the condition is true: Select this option to enter a Groovy expression that returns true if the post-function should run. For more information see Conditional execution using Groovy expression

  • Error Handling
    Make transition fail when an error occurs in this post-function: By default, all errors (Java Exceptions) raised by this post-function, including those raised by custom Groovy scripts, will be logged in the JIRA log file but will not be reported to the user and will not prevent the transition from completing. However, when designing new workflows or troubleshooting them, it is more convenient to be notified immediately of any such error during the execution of the transition. For example, on the production Jira instances, you might want to show errors only for the post-function(s) being worked on, in order to avoid disrupting other workflows. To make errors raised by the current post-function prevent the transition from completing and show the error in the browser, select Make transition fail when an error occurs in this post-function.

    If you want to show all the errors, either only to the admins or to all users, configure the option globally on the JMWE configuration page. For example, on development and staging Jira instances, you can activate error reporting for all JMWE post-functions, to display all the errors and it is recommended to do so, and on production Jira instances you might want to activate error reporting only to administrators so that they can be made aware of configuration errors.

When the option is selected on a post-function, it overrides the configuration on the JMWE configuration page.