Validation LINKED issues for resolution and due date

Issue #148 resolved
AlexA created an issue

I have a task: Epic and Task. linked to the Epic

To continue in a transition in the epic task, there is a Validation: Only linked tasks containing: DUE DATE filled AND Only jobs that are not closed (only open tasks and progress or other status).

Boolean expression that I have is this, but I can not continue

count(filterByFieldValue(filterByFieldValue(linkedIssues(), %{00012}, !=, ""), %{00012}, !=, "")) = count(linkedIssues())

Comments (8)

  1. Fidel Castro Armario repo owner

    Hi Augusto,

    I'm not sure I have understood what you want to do:

    Let's suppose that you want to allow certain transition in Epic's workflow to be executed, only if all it's tasks are unresolved and have Due Date set. In this case you can use the following boolean expression:

    count(filterByPredicate(linkedIssues("is Epic of"), ^%{00028} != null OR ^{00012} = null)) = 0
    

    Where:

    • ^%{00028} is field code for "Resolution" in foreign issues.
    • ^{00012} is code for numeric value of "Due Date" in foreign issues.

    There are many other posible boolean expressions, and also "Validation on linked issues" can be used.

    Please, let me know if I have correctly understood what you intend to do.

    Regards,

    Fidel

  2. AlexA reporter

    This worked perfectly, though: When I own two tasks (type:"Demand") which must contain (compulsorily) the due date field. This validation must be when all of the tasks of type: "demand" having the field "due date" filled.

  3. Fidel Castro Armario repo owner

    Hi Alex,

    Sorry, but I don't understand your explanation of what you intend to do.

    Do you want to implement a new different validation for requiring that "Demand" issues linked to current Epic issue have "Due date" set?

  4. AlexA reporter

    Yes !, Fidel The desire is that to continue, the rule is: 1 - The task contains (compulsorily) Due Date filled. (issue in Epic) 2 - The validation only for the type tasks: "Demand"

    PS: Sorry vocabulary, because not well mastered the English language.

  5. Fidel Castro Armario repo owner

    Alex, the following validation is exactly the same as before, but only applies to "Demand" issues, i.e., issue types different from "Demand" haven't any requirement on Status or Due Date:

    count(filterByPredicate(linkedIssues("is Epic of"), ^%{00014} = "Demand" AND (^%{00028} != null OR ^{00012} = null))) = 0
    

    This other validation is similar to the previous one, but restriction on Status applies to all issue types, while restriction on "Due date" only applies to "Demand" issues:

    count(filterByPredicate(linkedIssues("is Epic of"), ^%{00028} != null OR ^%{00014} = "Demand" AND ^{00012} = null)) = 0
    

    Note that :

    • ^%{00014} is field code for "Issue type" in foreign issues.
    • The name of the issue type must be written exactly as it is, i.e., Demand should be the exact name of the issue type, respecting also de case.
  6. Log in to comment