Wiki

Clone wiki

JIRA Workflow Toolbox / amazing / Make Parent Issue Progress Through Its Workflow

Making Parent Issue to be Transitioned by Subtask

A subtask can execute a post-function in order to move its parent issue through the workflow. For example, we can "Close Parent Issue when all Subtasks are Closed ".

How to Make Parent Issue Progress Through its Workflow?

A subtask can make its parent issue transition using 2 different sets of virtual fields:

  • "Parent's issue status" and "Parent's issue status (delayed writing)": if we write the name of a status (e.g., Open, In Progress, Closed, ...) into any of these 2 virtual fields, the plugin will look for transitions in parent's workflow going from parent's current status to a status with the same name as the one we have written. If a suitable transition is found and its conditions and validations are satisfied, the transition will be executed, and parent issue will be moved to entered status.
  • "Execute transition on parent issue" and "Execute transition on parent issue (delayed execution)": if we write the name of a transition (e.g., Start Progress, Close Issue, ...) into any of these 2 virtual fields, the plugin will look for a transition in parent's workflow departing from parent's current status with the entered name. If that transition exists and its conditions and validations are satisfied, the transition will be executed.

In order to transition parent issue, a subtask typically uses post-function "Copy a parsed text to a field" with the following configuration:

  • Target field: any of the 4 virtual fields above described.
  • Parsing mode: basic
  • Text to be parsed...: the name of a status or the name of a transition, depending of the selected target field.

Also "Set a field as a function of other fields" can be used.

Difference between "Parent's issue status" and "Parent's issue status (delayed writing)" or "Execute transition on parent issue" and "Execute transition on parent issue (delayed execution)":

Virtual fields "Parent's issue status" and "Execute transition on parent issue" try to transition parent issue as soon as they are written, while fields "Execute transition on parent issue (delayed execution)" and "Execute transition on parent issue (delayed execution)" wait for subtask's current transition to end execution, before transitioning parent issue.

When a subtask uses "Execute transition on parent issue (delayed execution)" or "Execute transition on parent issue (delayed execution)" fields for transitioning its parent issue, parent's execution attempt won't be carried out until current subtask's transition has finished, and thus subtask is in the new status. For this reason, these fields are used when parent issue is blocked by a condition or validator depending on subtasks statuses, typically by a conditions or validators like "Sub-Task Blocking Condition", Condition / Validation on subtasks, Boolean condition / validator with math, date-time or text-string terms, etc.

Example: Reopen Parent issue when a subtask is Reopened

In this example we show how to automatically reopen an issue in status Done when any of its subtasks is reopened.

Let's assume the following workflow:
./amazing/make-parent-progress/workflow.png

We will insert post-function "Copy a parsed text to a field" into transitions "Reopen" and "Reopen and start progress" with the following configuration:

./amazing/make-parent-progress/example-1-1.png

Note that:

  • %{00042} is field code for Parent's issue status.
  • We haven't written the name of the statuses in upper case, but like In Progress and Done, because JIRA UI typically shows the name of statuses in upper case, while the actual names are not. You can check up the actual names at JIRA Administration screens.


Once configured, transitions "Reopen" and "Reopen and start progress" will look like this:
./amazing/make-parent-progress/example-1-final-conf.png

Other Usage Examples:

Updated