Getting Started Guide

JMWE FOR JIRA CLOUD


Jira workflow post functions carry out rules after a transition is executed.
Post functions are the most common workflow extensions used for automating processes. Jira comes with several standard post functions, but JMWE ads many more. They will enable you to automate many rules using point-and-click configurations and even build your own.

 

Automatically create subtasks when a new story is created.
Close the story when all subtasks are closed.

Viewing time 12 min 8 sec  


For your convenience, the steps from the above video have been outlined below.

 

Automatically CREATE SUBTASKS when a new story is created, and CLOSE the story when all subtasks are closed. 

Part 1: Create one subtask   |   Part 2: Create multiple subtasks   |   Part 3: Close the story


Part 1 of 3:
When a new story is created, automatically create a subtask for that story.

  • Edit your workflow. Select the diagram view.
  • Choose the initial "create" transition. (The initial transition does not allow you to add conditions but supports validators and post functions).
  • Go to "Post Functions" and Add post function.
  • Select "Create issue(s) (JMWE app)" post function, press Add and configure it.
  • Leave Project as "Same as current project" - this is where the subtask will be created.
  • In Issue type, select "Sub-task".
  • In "Parent issue", leave "Current issue".
  • Optional: if you'd like to link the issue and the subtask, you can add a link in "Link to new issue" section.

 

  • You can specify the value of fields in the new issue, but in this case, let's just supply the summary: In the JMWE editor and tester, update "CLONE" to the summary of the subtask:
    This is the QA sub-task for {{issue.field.summary}}.

 

  • Optionally, you can set additional fields, as well as many other parameters. We'll skip these as we only need to create a new subtask.
  • Add a post-function, publish your draft, and check your work.

See it all in action in the video above.


 

Part 2 of 3:
Automatically create MULTIPLE subtasks - development subtask, QA sub-task, and documentation subtask - when a new story is created.

Instead of creating several "create issue" post functions described above, create multiple subtasks all in one post-function. It is easier to build and to maintain.

  • Edit your workflow. Select the diagram view.
  • Choose the initial "create" transition.
  • Go to Post Functions, and edit our "Create a new issue" post function.

 

  • To create multiple subtasks simultaneously, navigate to the "Multiple issue creation" section and select "Create multiple issues".
  • To specify an iterator, set up a list of values for new subtasks to be created. Type in: Development sub-task,QA sub-task,Documentation sub-task

  • Go up to the "Summary," insert the values of the iterator - {{it}} - which represents each value in the iterator section we set up in the previous step.

 

  • Click "update" to save the modified post-function, publish your draft, and check your work.

See it all in action in the video above.


 

Part 3 of 3:
Automatically CLOSE the story when all subtasks are closed.

  • Edit your workflow.
  • Select the "DONE" transition. When the DONE transition is triggered on the last subtask to be closed, then the parent story should be automatically closed.
  • Go to Post functions, and press "Add post function".
  • Select "Transition parent issue (JMWE app)" post-function, and Add.
  • In Transitions, click on "Transition picker..."
  • Select our workflow and the transition we want to trigger, which is "Done".
  • To add, click on "Use Transition ID", which is safer than using the Transition Name, in case the transition is renamed.

 

  • Press Add to add to the list, and Add the post function. This will ensure that when the DONE transition is triggered, it will also trigger the DONE transition on the parent task.

 

But that's not all! Note that we have not yet specified that the parent issue should only be closed if all the subtask are done. For that, let's add a condition.

  • Go to the "Conditions" tab and Add Condition.
  • Add a standard Jira condition called "Sub-Task Blocking Condition".
  • Specify the status in which the subtask should be in order for the DONE transition to be allowed on the story. Check "DONE" status. Press Add.

  • Publish your workflow and check your work.

See it all in action in the video above.



Read the documentation  |  Explore usage examples for JMWE Post Functions