Features used to implement the examples
Example 1: Block "Start Progress" transition if the issue "is blocked by" an issue in status other "Resolved", "Closed" or "Done"
Validation on linked issues checks up both, previously created issue links, and new issue links created in transition screen. When we want to check issue links created exclusively in transition screen, we should use Boolean validator with math, date-time or text-string terms with a boolean expression with function transitionLinkedIssues()
. Example: Validate only issue links created in transition screen
We are going to use Validation on linked issues to block "Start Progress" transition whenever current issue has an "is blocked by" issue link with an issue in a status different from "Resolved", "Closed" or "Done":
Once configured, "Start Progress" transition looks like this:
Alternative expression
The Boolean validator with math, date-time or text-string terms equivalent to this validation is: count(filterByPredicate(linkedIssues("is blocked by"), ^%{00016} not in ["Resolved", "Closed", "Done"])) = 0
Note that:
- %{00016} is the field code for "Issue status".
Example 2: Make sure an issue can only be closed if all duplicates with certain field values have been already closed
We want to guarantee that all duplicate issues have been closed before the original issue can be closed. At the same time we want guarantee that, for consistency, all duplicates have the same value in fields "Components", "Affected versions" and "Fixed versions", and that they belong to the same project as main issue:
The boolean expression used for filtering field values is: ^%{00094} = %{00094} AND ^%{00074} = %{00074} AND ^%{00077} = %{00077}
Note that:
- %{00094} is field code for "Components"
- %{00074} is field code for "Affected versions"
- %{00077} is field code for "Fixed versions"
Once configured, "Close Issue" transition looks like this:
Alternative expression
The Boolean validator with math, date-time or text-string terms equivalent to this validation is:
count(filterByPredicate(linkedIssues("is duplicated by"), ^%{00016} != "Closed" OR ^%{00018} != %{00018} OR ^%{00094} != %{00094} OR ^%{00074} != %{00074} AND ^%{00077} != %{00077})) = 0
Note that:
- %{00016} is field code for "Issue status"
- %{00018} is field code for "Project key"
Example 3: Make sure no issue type "Bug" is "blocked" or "cloned" by the transitioning issue
We want to use Validation on linked issues to forbid the existence of "blocks" and "clones" issue links to "Bug" issue types:
Once configured, the transition looks like this:
Alternative expression
The Boolean validator with math, date-time or text-string terms equivalent to this validation is:
count(filterByIssueType(linkedIssues("blocks, clones"), "Bug")) = 0
or count(filterByPredicate(linkedIssues("blocks, clones"), %{00014} = "Bug")) = 0
Note that:
- %{00014} is field code for "Issue type"
Other examples of that functions
- Block an epic's transition depending on linked issues status and due date
- Block creation of issue type X if it has not been linked with link type Y to issue type Z on the "Create Issue" screen
- Block or hide a transition for an issue depending on its issue links
- Enforce linked issues in a specific project to be "Closed" before closing issue
- Prevent issue from being "Closed" if blocking issues aren't yet closed
- Prevent issue from being closed if it has links of type "is blocked by" to open issues
- Prevent issue from moving forward if it's dependent on non-accepted tickets
- Prevent transitioning when there is a blocking issue
- Validate only issue links created in transition screen
Boolean validator with math, date-time or text-string terms
- 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