Next: Sequence of Post-functions
Add a comment on every transition to show when an issue was transitioned and by whom
Shared Actions let you create 'shared' JMWE post functions (or sequences of post functions) that can be reused in multiple workflow transitions. For example, set multiple fields using set field value post functions and then add them to transitions as one Shared Action, without the need to recreate them again and again. Or configure a post function to send an email, and then reuse it in different workflows.
Why you need Shared Actions
- Since Jira doesn't support 'copy-and-paste' of post functions, Shared Actions can help you reuse common configurations quicker and easier;
- One Shared Action can include multiple post functions to run in sequence - you can create a more sophisticated process once, and then reuse it in your workflow transitions;
- Using Shared Actions makes frequently used post functions easy to maintain - changes to the Shared Action will instantly apply to all transitions where it is being used.
For your convenience, the steps from the above video have been outlined below
Add a comment on every transition when an issue was transitioned and by whom
Instead of using a "Comment" post function added to each transition, add a "Shared Action" post-function instead. Configured once in the Shared Actions library, you'll always be able to modify it quickly - and it will apply to all transitions and workflows it is being used in.
- Go to the Shared Actions library page accessible from the JMWE Apps page of Jira Administration.
- Press "New shared action."
- Give it an Action name: " Comment issue when transitioned," and press "Add post function."
- Choose the "Comment issue" post function, and press "Add."
- Add a Comment: "The issue was transitioned by," then expand the Editor and Tester, go to the "Global Variables" tab, and press on the currentUser | userInfo("displayName") button. It will add the code for the name of the current user right into the above comment field.
- Press "Save" to add a post function.
- Press "Save" to save the Shared Action.
- Go to your workflow, and Edit it.
- Select a transition to which to add the action. Go to the "Post Functions" tab and "Add post function."
- Add "Shared Action (JMWE) app" post function to refer to the Shared Actions we set up previously.
- Select our "Comment issue when transitioned" post function. Press Add.
- Add this Shared Action to all your desired transitions. Publish your workflow, and check your work.
The benefit of Shared Actions - quickly modify your work
- If you want to modify the comment that is posted automatically during these transitions, you edit your Shared Action, edit the post function in it, and change the comment body.
For example, add a date:
- Add "on" by typing into the comment.
- Go to the "Global Variables" tab and press now help option to insert into the comment field.
- And Save.
- Save the Shared Action - no need to modify or publish your workflows.
- Check your work. Now the comment will include the date.
See it all in action in the video above.
Additional Tip: In the Shared Actions page (see below), combine one or more JMWE post functions into an action. Then, use the Shared Action post function to add it to various transitions, even in different workflows.
Next: Sequence of Post-functions
Last updated: 2023-03-21