Features used to implement the example
- Write field on linked issues or sub-tasks
- Block or hide a transition for an issue depending on its issue links
We add Write field on linked issues or sub-tasks to "Resolve Issue" transition on Story's workflow, in order to execute transition "*Resolved Issue*" on Epic issue. To do it we write the name of the transition into virtual field "Execute transition (delayed execution)". We use a boolean expression in order to check that the rest of the stories are already resolved or closed.
We add Blocking or hiding a transition depending on its issue links to "Resolve Issue" transition in Epic's workflow, in order to prevent Epic from being manually resolved while some of its Stories are still "Open" or "In Progress".
Example: Automatically resolve an epic when all its stories are resolved
We are going see how to implement a mechanism in our workflows, in order to auto-transition "Epic" to Resolved status when all its "Stories" become Resolved or Closed. Let's see in screenshots how to configure the different features.
We add Block or hide a transition for an issue depending on its issue links to "Resolved Issue" transition in "Epic's workflow:
Once configured, transition "Resolved Issue" in Epic's workflow will look like this:
We add Write field on linked issues or sub-tasks post-function to "Resolve Issue" transition in "Story's workflow:
Note that: if you are using Jira 7.0 or higher with versions of Jira Workflow Toolbox older than Release Notes for 2.2.8, you should input the following boolean expression in parameter Filtering by field values:
count(filterByStatus(filterByIssueType(linkedIssues("is Epic of"), "Story"), "Done, Closed, Resolved")) = count(filterByIssueType(linkedIssues("is Epic of"), "Story")) - 1
Once configured, transition "Resolved Issue" in Story's workflow will look like this:
This same configuration should be added to "Close Issue" and "Done" transitions in Story's workflow, in case direct closing is allowed for stories.
Other examples of that functions
Related Usage Examples