π Ultimate Condition & Validator
A Smarter Way to Build Jira Validators π
Weβve been working on a more flexible way to build conditions using Jira Expressions, and that led to Ultimate Validator. It lets you use most of the power of Jira Expressionsβbut without writing code. Instead, you build conditions through a simple UI.
How Ultimate Validator Works
After selecting a sourceβsuch as a field or the current userβa list of operations appears. Each operator leads to the next until you reach a terminal operator that requires a value. The Jira expression preview is generated in real time, so you always know exactly how your condition worksβno more guesswork.
Hereβs what it looks like:

Common Use Cases
Here are some common scenarios where the Ultimate Validator simplifies complex conditions.
Making a Field Required Only in Certain Cases
Jiraβs built-in Field Required validator doesnβt allow conditionsβyou either require a field for every transition or not at all. But often, you need a field to be required only when certain conditions are met.
With Jira Expressions, this is possible. For example, if you want the Root Cause field to be required only when Resolution is set to Fixed, you could write:
issue.resolution?.name == 'Fixed' ? issue.customfield_10126 != null : true
Alternatively, you can achieve the same result using the ||
(OR) operator. In this case, you'd need to invert the condition: allow the transition when the resolution is not 'Fixed', or require the "Root Cause" field otherwise:
issue.resolution?.name != 'Fixed' || issue.customfield_10126 != null
Ultimate Validator lets you set this up easily through the UI, with no need to write code.

Handling Rich Text Fields in Jira Expressions
There are a few key points to keep in mind when writing Jira Expressions manually. First, almost every field can be null
, so you typically need to check for null
before performing operationsβotherwise, you may encounter a Syntax Error during execution.
Counting characters in Short Text fields is straightforward, but Rich Text (Paragraphs) can be tricky. Most rich text fields are stored as ADF (Atlassian Document Format) objects, meaning they need to be converted using new RichText(value)
to access the .plainText
property. However, some fieldsβlike Description or Environmentβare exceptions, as they are already converted when used in expressions.
Ultimate Validator takes care of these complexities, ensuring that your validation works correctly without requiring manual adjustments.

Counting Items in Multi-Select Fields
With the Count operator, you can validate how many items have been added or selected in multi-value fields, such as:
The number of attachments on an issue.
Whether only one option is selected in a multi-select field.
Ensuring a required number of checkboxes are selected.
Requiring a minimum number of Versions, Components, or Labels.

Validating Child and Linked Issues
Jira Expressions allow you to check relationships between issues. The key properties are:
subtasks
β Returns an issueβs sub-tasks.stories
β Returns an Epicβs child issues (excluding sub-tasks).childIssues
β Returns both child issues and sub-tasks.
You can also test issue links (e.g., βblocked byβ) and parent issues.
Ensure Time Is Logged on an Issue or Its Sub-Tasks
To prevent issues from progressing without logged work, you may want to require that time is recorded either on the issue itself or one of its sub-tasks.

Ensure Child Issues Are Closed Before Transitioning the Parent
When requiring all child issues to be closed before the parent moves to a completed status, it's best to use status categories rather than individual status names. Jira has three status categories:
To Do
new
2
In Progress
indeterminate
4
Done
done
3
With Ultimate Validator, you donβt need to deal with categories IDs or keysβjust pick the right option from the dropdown.

Properly Validating Cascading Select Fields
The built-in Field Required validator only checks if the parent option is selectedβit doesnβt check the child option. This means a transition can still go through even if the child selection is missing, which isnβt always the expected behavior.
This is a known issue (JSDCLOUD-6199), but Ultimate Validator provides a child option operator, allowing you to ensure that the child option is always selected.

Checking if an Issue is in an Active Sprint
You can check various sprint properties in Jira Expressions, such as start date, end date, completion date, and state.
To check if an issue is in the current sprint, validate the sprint state:
"active"
β Sprint is in progress."future"
β Sprint is planned but not started."closed"
β Sprint has ended.
With Ultimate Validator, you can easily enforce sprint-based conditions without needing custom expressions.

Ensuring an Issue Is Not Associated with Released Versions
With Ultimate Validator, you can test system fields like Affects Versions, Fix Versions, or custom version pickersβnot just by version name, but also by version properties such as description, start and release dates, and states like archived or released.

Tip: If the version field can be empty, include a clause to allow empty values; otherwise, start directly with the check for released versions.
Last updated