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 us suppose that you want to allow a certain transition in Epic's workflow to be executed, only if all its 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" does not have 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
- Block a transition until all sub-tasks have certains fields populated
- Block an epic's transition depending on linked issues status and due date
- Block or hide a transition for an issue depending on its issue links
- Block or unblock a transition after an issue rested a specific time in a status
- Block transition until all sub-tasks are in a specific status category
- Close parent issue when all sub-tasks are closed
- Enforce a field (Select List) to be set when another field (Radio Button) has a certain value (works with any kind of field type)
- Ensure that all issues linked with a certain issue link type have "Due Date" field set
- If field A is populated then, field B must also be populated
- Limit issue creation per role and issue type
- Limit the number of hours a user can log per day
- Limit valid dates for work logs
- Make "Time Spent" field required when there is no time logged in the issue
- Make a custom field mandatory when priority is "Critical" or "Blocker" and issue type is "Incident"
- Make attachment mandatory depending on the value of certain custom field
- Make different fields mandatory depending on the value of a Select List custom field
- Make linked issues, sub-tasks and JQL selected issues progress through its workflows
- Make parent issue progress through its workflow
- Prevent issue creation if another issue with same field value already exists
- Reject duplicated file names in attachments
- Require at least one sub-task in status "Resolved" or "Closed" when "Testing required" is selected in Check-Box custom field
- Require issue link when resolving as duplicate
- Restrict parent issue from closing if it has sub-tasks that were created during a given parent issue status
- Restrict sub-task type creation depending on parent issue status
- Restrict sub-task type creation depending on parent issue type
- Set a condition in a global transition which only applies in a certain status
- Validate a custom field "Story Points" has been given a value in Fibonacci sequence
- Validate compatible values selection among dependent custom fields
- Validate only issue links created in transition screen
- Validate that multi-user picker custom field A does not contain any user in multi-user picker custom field B
- Validation and condition based on time expressions
- Validation based on the value of a date type project property
- Validation on issue attachments
- Validation on MIME types of issue attachments
- Validation on sibling sub-tasks depending on issue type and status
- Validation on the value of a Cascading Select field