Field Comparator

Field Comparator

The Field Comparator validator compares a field value with another field or a fixed value using various comparison operators. It supports extensive field type conversion and specialized operators for user field validation against roles and groups.

image-20250804-103552.png

Fields

  • Field (required): Select the primary field whose value you want to compare.
    This field is required.

  • Operator (required): Select the comparison operator to use between the two fields.
    Supported operators:

    • Basic Comparison Operators

      • equals (==)

      • not equals (!=)

      • less than (<)

      • less than or equals (<=)

      • greater than (>)

      • greater than or equals (>=)

    • Empty/Null Operators

      • is empty - Field is null or empty (for lists and strings)

      • is not empty - Field has a value

    • List/Array Operators

      • one of - Source value(s) are contained in target list

      • not one of - Source value(s) are not in target list

      • contains values - Source list contains all target values

      • not contains values - Source list doesn't contain target values

    • User Field Role/Group Operators

      • belongs to one role of - At least one user in the field belongs to one of the selected project roles

      • not belongs to one role of - No user in the field belongs to any of the selected project roles

      • belongs to one group of - At least one user in the field belongs to one of the selected groups

      • not belongs to one group of - No user in the field belongs to any of the selected groups

  • Compare with (required): Choose what to compare the field value against:7

    • Field - Compare with another field value

    • Value - Compare with a fixed text value

    • Roles - Compare user fields against project roles (for role operators only)

    • Groups - Compare user fields against user groups (for group operators only)

  • Field to compare (required): If compare with field selected, select the secondary field to compare with the primary field.

Technical Notes

  • Role/Group Operators: Only available when a User field (single or multi-user) is selected

  • Field Type Compatibility: The validator shows warnings when comparing incompatible field types

  • Type Conversion: Automatic conversion between compatible types (dates, numbers, strings)

  • Array Handling: Smart handling of single values vs. arrays

  • User Field Processing: Uses accountId for standard comparisons, role/group validation for specialized operators

  • Rich Text Support: Automatic conversion to plain text for comparison

  • Performance: Role/group validations use optimized Jira API calls

  • Safety: All comparisons include null safety checks

 

Supported Field Types

Standard Jira Fields

  • Text fields (single and multi-line)

  • Number fields

  • Date fields (Date and DateTime with automatic conversion)

  • User fields (single and multi-user; comparison by accountId)

  • Select fields (single and multi-select; comparison by value)

  • Status, Priority, Resolution (comparison by name)

  • Project (comparison by key)

  • Issue Type (comparison by name)

  • Components, Versions (comparison by name)

  • Labels (array handling)

  • Comments (full text search)

  • Security Level (comparison by name)

  • Group fields

  • Watchers

Custom Fields

  • Select Lists (single and multi-select)

  • User Picker fields (single and multi-user)

  • Date/DateTime pickers

  • Number fields

  • Text fields (single and multi-line)

  • Team fields

Service Desk Fields

  • Customer Request Type (comparison by requestType.name)

  • Customer Organizations (comparison by name)

  • Request Language (comparison by languageCode)

  • Feedback Rating (comparison by rating)