How to trigger issue transition from the message from "Display message to user (JMWE app)"

The Display message to user (JMWE app) post-function displays a message to the user triggering the transition, as a “flag” in the top right corner of the issue view page or Jira Software board. This article explains how to trigger a transition on an issue from the message displayed by "Display message to user (JMWE app)"

Instructions

  1. Navigate to the intended workflow to make the necessary changes in the edit mode.

  2. Select the required transition.

  3. Select the Post functions tab and click Add post function.

  4. Add the "Display message to user (JMWE app)" post-function.

  5. Add appropriate “Message title:”, “Message body:” and “Message type:”

  6. Select the checkbox “Add action link” under “Action link”

  7. Add appropriate “Action title:”, select “Action type:” as “Navigate to URL” and add the below in URL :

    <% jira = ComponentAccessor.getApplicationProperties().getString("jira.baseurl") import com.atlassian.jira.security.xsrf.SimpleXsrfTokenGenerator def XSRFToken = ComponentAccessor.getComponent(SimpleXsrfTokenGenerator).generateToken() print "${jira}/secure/WorkflowUIDispatcher.jspa?id=${issue.id}&action=TRANSITION_ID&atl_token=${XSRFToken}" %>

Replace TRANSITION_ID in the above snippet with the id of the target transition.

Make sure the target transition added above is available from the current status of the issue, and the Condition(s), Validator(s) added (if any) on the target transition must return true for the transition to execute successfully.

With this, when the Action title is clicked from the message pop-up, the target transition is executed.

“Display message to user (JMWE app)" post-function”