Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Equivalent JQL in Cloud for Scriptrunner "issuefunction in expression()"

Matt Parks
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 31, 2026

I have the following query in Jira DC that returns a list of all of the issues where Original Estimate is less than the 'Hours In Developing' field, which is a number field

issueFunction in expression("", "fromTimeTracking(originalestimate) / 3600000 < HoursInDeveloping")

I have confirmed that this works correctly in DC, but we are migrating to Cloud and the function cannot be converted using Scriptrunner Enhanced Search.

I have tried using the 'Ask AI' feature to show issues where the value in the Original Estimate field is less than the value of the Hours In Developing field (and other equivalent asks), but it was.....not particularly helpful.

Is there any way in Cloud to write a JQL query that will compare the values in two number fields?

2 answers

1 vote
Germán Morales
Community Champion
August 1, 2026

Hi @Matt Parks,

There is no equivalent native Jira Cloud JQL for this comparison. Atlassian explicitly states that JQL cannot compare one field with another. The expression() function is provided by ScriptRunner on Data Center, so its availability in Cloud depends on the app rather than Jira’s native JQL.

A native Cloud workaround is to maintain a helper field with Automation:

  • Create a checkbox or single-select field such as Estimate below Hours in Developing.
  • Trigger the rule whenever Original estimate or Hours In Developing changes, and first confirm that both fields contain values.
  • Use a smart-values condition with {{issue.timetracking.originalEstimateSeconds.divide(3600)}} on the left, less than as the operator, and {{issue.customfield_12345}} on the right. Replace 12345 with the ID of the Hours In Developing field.
  • Set the helper field to Yes when the comparison is true and No otherwise.

You can then use normal JQL such as "Estimate below Hours in Developing" = Yes. Run the rule once on a schedule to populate existing work items, then let the field-change trigger maintain it. Atlassian documents the JQL field-comparison limitation and the available Automation comparison conditions.

0 votes
James Gamble
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 3, 2026

Hola Matt,

There isn't a direct equivalent to ScriptRunner Data Center's expression() function in either native Jira Cloud JQL or ScriptRunner Enhanced Search for Cloud. Native JQL can compare a field with a fixed value or supported function, but it can't compare the value of one field directly with another.

The automation-based helper field already suggested is the most practical native Cloud approach. One refinement would be to use a numeric field, such as Estimate Variance Hours, instead of a Yes/No field. Automation could calculate Hours In Developing minus Original Estimate in hours, and you could then search with normal JQL, such as:

"Estimate Variance Hours"> 0

That also gives you the option to sort or report on the size of the variance rather than only identifying whether one exists.

The rule would need to run whenever either source field changes, and you'd need a one-time scheduled rule to populate the helper field for existing work items. I'd also add handling for cases where either field is empty, so stale values aren't left behind.

Atlassian confirms the field-to-field limitation here.

Thanks,

James

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events