How to compare two custom fields using JQL function

Vineela Durbha November 20, 2017

I am looking to compare 2 customfields of same datatype. Any help on this approach

3 answers

2 votes
philubert May 10, 2021

Using Adaptavist's ScriptRunner, you can do this in JQL:

issueFunction in expression("","field1 > field2")
Syed Nabeel Anwer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 6, 2023

excellent

1 vote
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 21, 2017

Natively within Jira there is not a way to do this.   However you might be able to leverage a plugin in Jira in order to search like this. 

I have found a few other threads that appear to indicate that SQL for Jira might be able to be used in this manner.

And another thread that indicates you might be able to use Scriptrunner in order to make a comparison like this.

Vineela Durbha November 24, 2017

Thanks for your suggestion Andrew.

I am looking for comparison using script runner. Also I would like to know what classes needs to be extended for this?

0 votes
Syed Nabeel Anwer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 24, 2024

Just to give you an example in order to find out in case any item got closed after due date you can use the following function:

 

Closed After Due Date:

issueFunction in expression("", "due < dateclosed")

Suggest an answer

Log in or Sign up to answer