Jira Expressions validations and conditions

With Workflow Magic Box, you can craft custom validators to enhance your Jira issues management. Here, we provide a selection of examples that you can easily customize to fit into your workflows.

Understanding Jira Expressions is key: a test is successful if the result is truthy, meaning it is anything but false, zero, empty, or null. This feature allows you to refine your project management process by ensuring that your workflows only proceed with valid data.

Examples

All subtasks are solved

This validator checks that all the subtasks are solved (have a resolution).

issue.subtasks.every(subtask => subtask.resolution != null)

At least there is one public comment

issue.comments.filter(c => !c.properties['sd.public.comment'].internal).length

Issue has a certain label

issue.labels.includes("my-label")

Issue has three or more attached files

This validator checks that the issue has at least three attachments.

Linked issues of a certain type are in status Done

This validator checks that all the linked issues with link type “Relates” are in status “Done”.

Useful external links

Atlassian documentation of Jira expressions

Jira expressions Type references

Jira expression restrictions