Auto Close Epic

Issue #607 resolved
T created an issue

We evaluating the plugin for automating epic status and other linked issues status i.e., "Automatically resolve Epic when all its Stories are resolved" or "Automatically close issue when certainly linked issues are close" https://bitbucket.org/fcarmario/jira-workflow-toolbox/wiki/amazing/Resolve%20Epic%20when%20Stories%20are%20Resolved

Followed all those steps in that link but it didn't auto close the epic when stories under it are done, I had attached epic and story xml files as requested. Environment JIRA 7.1.9 JWT 2.2.36

Comments (5)

  1. Fidel Castro Armario repo owner

    Hi Tej,

    In your Story workflow, use the following configuration in post-function "Write field on linked issues or subtasks" in Done transition:

    Captura de pantalla 2017-05-17 a las 23.43.46.png

    Leave the rest of parameters untouched.

    In your Epic workflow, use "Validation on linked issues" the following configuration:

    • Issue link types: is Epic of
    • Issue types for linked issues: Story
    • Statuses for linked issues: Closed, Resolved and Done.
    • Resolutions for linked issues: don't select any one.
    • Linked issues must belong to: any project
    • Filtering by field values: leave it empty
    • Minimum required number of issue links: 0
    • Maximum allowed number of issue links: 9999
    • Allow unselected issue link types: CHECKED
    • Allow unselected issue types: CHECKED
    • Allow unselected statuses: UNCHECKED
    • Allow unselected resolutions: CHECKED
    • Allow unsatisfied condition on field values: UNCHECKED
    • Message to show when validation fails: Epic can't be closed, since there is still at least an open Story.

    You can use "Boolean validator with math, date-time or text-string terms" validator instead, using the following boolean expression:

    count(linkedIssues("is Epic of")) = count(filterByStatus(linkedIssues("is Epic of"), "Closed, Resolved, Done"))
    
  2. T reporter

    Hi Fidel Castro Armario, Thanks for the comment I tried this method here "The validation will block the transition on the Epic until all Stories are closed." I don't want to block it "I want to automate the transition of Epic, epic must go to done state automatically when all stories under it are closed" and if a new story is added it has to open state again it's all about automating! I think Regards, Tej

  3. Fidel Castro Armario repo owner

    Hi @tEjdave,

    Then remove the validation from Epic's workflow, and use the following boolean expression in parameter Conditional execution in post-function "Write field on linked issues or subtasks" at Done transition in Story's workflow:

    count(linkedIssues("is Epic of", linkedIssues("has Epic"))) - 1 <= count(filterByStatus(linkedIssues("is Epic of", linkedIssues("has Epic")), "Closed, Resolved, Done"))
    

    On the other hand, add post-function "Write field on linked issues or subtasks" to transition "Create Issue" at Story's workflow using the following configuration:

    Captura de pantalla 2017-05-17 a las 23.38.02.png Captura de pantalla 2017-05-17 a las 23.38.21.png

    For the rest of parameters use:

    • Filtering linked issues or subtasks by status: Closed, Resolved, Done.
    • Linked issues or subtasks belong to: Any project.
    • Filtering by field values: leave it empty
    • Write linked issues and subtasks recursively: UNCHECKED
    • Conditional execution: leave it empty
  4. Log in to comment