🚀 Ultimate Condition and Validator - A Smarter Way to Build Jira Validators – Now in Beta! 🎉

We’ve been working on a more flexible way to build conditions using Jira Expressions, and that led to Ultimate Validator (now in Beta). 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:

Attachments (1).gif

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.

Conditional_require_780.gif

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.

Paragraph_chars_count_780.gif

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.

Count operator.png

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.

Example: Ensuring that time is logged on either an issue or one of its sub-tasks.

timespent_subtasks_780 2MB.gif

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

This is a known issue, but Ultimate Validator provides a child option operator, allowing you to ensure that the child option is always selected.

cascading_child_not_empty_compact.png

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.sprint_active.png

There’s much more to explore, but that may be a story for another time. :)

I am from Forgappify and the Ultimate Validator is part of the Workflow Building Blocks for Jira app.

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events