Laya expressions
Laya WorkflowOS's built-in formula language: the fields, functions and operators you can use in conditions and in calculated smart values.
Last updated
Laya expressions are a small, safe formula language built into Laya WorkflowOS. They are not Groovy and not Jira's own expressions. They read an issue's fields, call a fixed set of functions, and run on Atlassian. They cannot run code, call other services or change anything on their own.
Where you can use them
- As an Expression condition, which must be true for the rule to continue.
- Inside any action text as a calculated value, written
{{= ... }}, for example in a comment, a field value or a due date.
When a rule has an expression condition, the rule builder shows a short reference: choose Functions & examples.
Fields
Use field names on their own, such as priority, not issue.priority: key, summary, status, statusCategory, priority, type, assignee, reporter, resolution, project, labels, components, fixVersions, created, updated, duedate and resolutiondate. For a custom field, use field("customfield_10016") with the field's id.
Functions
| Group | Functions |
|---|---|
| Logic | if(cond, then, else), coalesce(a, b, ...), not(x), isEmpty(x) |
| Text | concat, contains, upper, lower, trim, substr, replace, startsWith, endsWith, matches(s, regex), len |
| Number | number, round, abs, floor, ceil, min, max, sum |
| Date | now(), today(), daysSince(d), daysUntil(d), dateAdd(d, days), year(d), month(d) |
Functions take their values as arguments: write contains(summary, "urgent"), not summary.contains("urgent").
Operators
Compare with ==, !=, <, <=, > and >=. Combine with && (and), || (or) and ! (not). Calculate with +, -, *, / and %. Put text in double or single quotes.
Examples
| Expression | What it means |
|---|---|
priority=="Highest" && daysSince(created) > 3 | A Highest-priority issue created more than three days ago. |
contains(labels,"vip") && statusCategory != "done" | An issue labelled vip that is not done yet. |
isEmpty(assignee) && daysUntil(duedate) <= 2 | An unassigned issue due within two days. |
{{= if(number(field("customfield_10016")) > 8, "Highest", "Medium") }} | A calculated value: Highest when the custom field is above 8, otherwise Medium. |
Email support@laya.net and include what you expected, what happened, and a link to the affected board or item so we can help quickly.