Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Section


Column
width30%600px


Panel
borderColor#333f48
bgColor#FFFFFF
titleColor#eeeeee
borderWidth1
titleBGColor#333f48
borderStylesolid
titleOn this page

Table of Contents
maxLevel1



Column




Example: Block an Epic's transition depending on linked issues status and due date

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).

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

Note that:

  • ^%{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.

Other variation of the usage example

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.

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 the case


Other examples of that function

Incoming Links
pageBoolean condition and validator with math, date-time or text-string terms
labelsexample



Related Usage Examples

Content by Label
showSpacefalse
cqllabel = "example" and label in ("transition","issue-links")