Example: Transition parent issue only when certain issue sub-task types are done
User Stories have a user story workflow. The Engineering Sub-Task type has an engineering sub-task workflow. The QA Sub-Task type has a qa sub-task workflow.
I have the following compound criteria to meet:
- When at least one Engineering Sub-Task or QA Sub-Task type is set to "In Progress", auto transition the parent User Story to Step 2.
- Only when all Engineering Sub-Task types are "Done", auto transition the parent User Story to Step 3. This happens regardless of the status of the QA Sub-Tasks.
- Only if all Engineering Sub-Task types and QA Sub-Task types are "Done", allow transition of the User Story from Step 3 to Step 4.
I've seen a few workflow plugins that allow transition of the parent if *all* sub-task types are set to a particular status or resolution. That would violate #2, however. Are there any plugins that allow you to segregate sub-task types for different transition thresholds? I've been searching and thus far I haven't found any.
From a logic perspective it could work like this:
- Post Function on the Engineering Sub-Task workflow for the "Done" transition:
- If all sibling Engineering Sub-Task types are "Done", auto-transition the parent issue from Step 2 to Step 3 (#2 in the compound criteria I listed above)
- If all sibling Engineering Sub-Task types are "Done" and QA Sub-Task types are "Done", allow transition from Step 3 to Step 4.
Note: There is no allowed transition of the story from Step 2 to Step 4. That is handled at the User Story level.
Your requirements can be implemented in Jira Workflow Toolbox using two features of this plugin:
- Validation on sub-tasks: to be inserted in "From Step 2 to Step 3" and "From Step 3 to Step 4" transitions of Story Workflow, in order to prevent transition ejecutions if criteria 2 and 3 are not met. This validators work always, i.e. in human triggered transitions or post-function triggered transitions.
- Copy parsed text to a field to write on virtual fields "Parent's issue status" and "Parent's issue status (delayed writing)": when you write the name of a status into these virtual fields (provided by the plugin) you are transitioning parent's issue to that status, provided there is a transition in parent's workflow from current status to desired status, and all conditions and validators of that transition are met. The difference between them is that "Parent's issue status (delayed writing)" waits for sub-task transition to be executed, so that it is in the new status before parent transition is attempt. This way validator Validation on sub-tasks won't block parent transitioning if triggering sub-task was the lasting Engineering Sub-Task to be moved to "Done" status.
Now I explain in detail how to do it. I'm considering that "Done" is a status in sub-tasks workflows, but if it were a Resolution value it wouldn't be a problem.
Post-function Copy parsed text to a field in transition "Start Progress" in "Engineering Sub-Task" and "QA Sub-Task" workflows
This post-function will auto-transition parent issue to "Step 2" when any of the sub-tasks are moved to status "In Progress". Use the configuration shown in the screenshot. Notice that "Status of Step 2" must be replaced with the name of the status associated with Step 2:
Post-function Copy parsed text to a field in transition to status "Done" in "Engineering Sub-Task" workflow
This post-function will auto-transition parent issue to "Step 3" when the last Engineering Sub-task is moved to status "Done". This post-function work as a team with validator Validation on sub-tasks in transition "From Step 2 to Step 3" in Story workflow. Use the configuration shown in the screenshot. Notice that "Status of Step 3" must be replaced with the name of the status associated with Step 3:
Validator Validation on sub-tasks in transition "From Step 2 to Step 3" in Story workflow
This validator will prevent execution of transition from Step 2 to Step 3 unless every Engineering Sub-task is in status "Done":
Validator Validation on sub-tasks in transition "From Step 3 to Step 4" in Story workflow
This validator will prevent execution of transition from Step 3 to Step 4 unless every Engineering Sub-task and QA Sub-task is in status "Done":
Other examples of that functions
- Close parent issue when all sub-tasks are closed
- Enforce certain type of sub-tasks to be "Resolved" to allow executing a transition
- Make linked issues, sub-tasks and JQL selected issues progress through its workflows
- Make parent issue progress through its workflow
- Proceed with a task only when all sub-tasks are completed
- Transition parent issue only when certain issue sub-task types are done
- Add all assignees of certain sub-task types to a "Multi-User Picker" custom field
- Add and remove a single or a set of items from multi valued fields
- Add current user to comment
- Add or remove request participants
- Add watchers from a part of the issue summary: "Summary_text - watcher1, watcher2, watcher3, ..."
- Assign issue based on the value of a Cascading Select custom field
- Assign issue to last user who executed a certain transition in the workflow
- Automatically close resolved sub-tasks when parent issue is closed
- Automatically reopen parent issue when one of its sub-tasks is reopened
- Calculate the time elapsed between 2 transition executions
- Close parent issue when all sub-tasks are closed
- Combine the values of several Multi-User picker fields
- Compose a parsed text including the "full name" or a user selected in a User Picker custom field
- Compose dynamic text by inserting field values in a text template
- Copy issue labels to a custom field
- Copy the value of a user property into a user picker
- Create a comment in sub-tasks when parent transitions
- Execute transition in epic
- Getting the number of selected values in a custom field of type Multi Select
- Limit the number of hours a user can log per day
- Make a sub-task's status match parent issue's current status on creation
- Make parent issue progress through its workflow
- Moving story to "In Progress" when one of its sub-tasks is moved to "In Progress"
- Moving story to "Ready for QA" once all its sub-tasks are in "Ready for QA" status
- Parse Email adresses to watchers list
- Parsing text from last comment and appending it to issue's summary
- Remove versions selected in a version picker custom field
- Replace certain issue link types with different ones
- Restrict parent issue from closing if it has sub-tasks that were created during a given parent issue status
- Set a Select or Multi-Select field using regular expression to express the values to be assigned
- Set assignee depending on issue type
- Set field depending on time passed since issue creation
- Set priority for issues that have been in a certain status for longer than 24 hours
- Set security level based on groups and project roles the reporter or creator are in
- Transition linked issues in currently active sprint
- Transition only a sub-task among several ones
- Transition parent issue only when certain issue sub-task types are done
- Update Cascading Select custom field with a value of the field in parent issue
- Update checkboxes custom field if a file has been attached during a transition
- Validation on issue attachments
- Validation on MIME types of issue attachments
- Writing a comment to blocked issues when blocking issues are resolved