Closing issue based on status of linked issues

Issue #610 resolved
Weston Rossborough created an issue

I'm trying to get the following scenario to work.

I have an issue in my main project that has 3 linked issues in "Support Team" projects. When I close the parent issue in my main project the linked "child" issues also close in the support team projects.

Linked issues in the support team projects also have the ability to close the parent issue when the linked child issues close.

What I would like to set up is the ability to prevent the parent issue from closing until ALL linked child issues are closed. The parent issue in the main projects still needs the ability to close itself along with linked child issues if needed.

Here is the post function I'm using to close issues between the main project and support team projects. This post function is modified slightly between the main project and support team projects. LinkedIssues.jpg Is it possible to create a conditional execution in this post function to check whether all linked issues are closed in the support teams? The logic of this would be if any linked issues exist in other support team projects this post function would not fire. I would be placing this post function in the closing transition on all support team project workflows. The parent issue in the main project still needs to be able to close even if linked issues in support team projects are open.

If this isn't possible with conditional executions is there another way of doing this?

Comments (3)

  1. Fidel Castro Armario repo owner

    Hi Weston,

    Use the following boolean expression at parameter Conditional execution in "Write field on linked issues or subtasks" of support teams' workflow:

    count(linkedIssues("causes", linkedIssues("is caused by"))) - 1 <= count(filterByStatus(linkedIssues("causes", linkedIssues("is caused by")), "Mark Resolved, Closed, Done, Resolved"))
    

    I'm assuming that:

    • Issue link type is called "causes" from parent issue.
    • A comma separated list with the statuses for resolved situation in support teams' issues is: "Mark Resolved, Closed, Done, Resolved".
  2. Weston Rossborough reporter

    Hi Fidel,

    Thanks for the response. I'll give this a try and let you know the progress.

    Thanks,

    Weston

  3. Log in to comment