Forums

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

How to compare two custom fields using JQL function

Vineela Durbha
Contributor
November 20, 2017

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

3 answers

2 votes
philubert
Contributor
May 10, 2021

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

issueFunction in expression("","field1 > field2")
Syed Nabeel Anwer December 6, 2023 edited

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
Contributor
November 24, 2017 edited

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 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
TAGS
atlassian, jira cloud certification, managing jira projects, jira project administration, jira cloud exam, atlassian certification, agile project management, jira workflows, jira permissions, jira training, jira cloud skills, atlassian learning

Become a Certified Jira Service Project Expert 🦸🏻‍♂️

Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.

Get Certified! ✍️
AUG Leaders

Atlassian Community Events