Condition / validator for Epic on issues subtas

Issue #457 resolved
ME created an issue

Hi Fidel,

Is there a possibility for a validator or condition on an epic workflow for subtasks that are in an issue of an epic?

Example:

Epic ABC-123 Issue ABE-456 Subtask ABE-789

Issue ABC-123 should not be able to do a certain transition based on the status of Subtask ABC-789.

Looking forward to your response.

All the best, Moshe E

Comments (5)

  1. Fidel Castro Armario repo owner

    Yes, it's perfectly possible, but I need a more generic and detailed description of the behavior you want to implement, since I imagine that the Epic can have more than one issue, and these issues can have more than one subtask.

    Please, specify the type of dependence on subtasks' statuses, and which statuses are allowed or forbidden in order to allow Epic transition excution.

  2. ME reporter

    In my epic you can only have standard issue types and no subtasks. However if I a validator to transition to Closed only if all subtasks in the standard issue type in this Epic are in Closed as well.

  3. Fidel Castro Armario repo owner

    You can do it by inserting "Boolean validator with math, date-time or text-string terms" in transition "Close Issue" of Epic workflow using a boolean expression like this:

    count(filterByStatus(subtasks(linkedIssues("is Epic of")), "Closed")) = count(subtasks(linkedIssues("is Epic of")))
    

    If you wanted to allow statuses "Closed" and "Resolved" you would have to use the following boolean expression:

    count(filterByStatus(subtasks(linkedIssues("is Epic of")), "Closed, Resolved")) = count(subtasks(linkedIssues("is Epic of")))
    
  4. Log in to comment