Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Comparing Due Date with Resolved date using JQL Function plugin returns empty result?

I have created a JQL Function plugin like issue in dateComparison("RESOLVEDDATE",">","DUEDATE"), but this query is taking more time to get executed, it still takes time and return No issue found.


But When i pass the Project key, the results are fetched as expected -> dateComparison("JIRA","RESOLVEDDATE",">","DUEDATE")


I came to know that, the getValues() method will get executed 3 times when the JQL is called, I guess this is the reason why it is taking more time and returns no issues.


Is there any way to overcome this?can someone help me fix this one?

I wanted to fetch all the issues with this query itself -. dateComparison("RESOLVEDDATE",">","DUEDATE")

2 answers

0 votes
sheriff I'm New Here Dec 03, 2021

Try using issueFunction in expression()


issueFunction in expression("", "created.clearTime()==resolutionDate.clearTime()") ORDER BY created DESC, updated DESC


issueFunction in expression("", "created.clearTime()==resolutionDate.clearTime()") - the condition, that converts Date-Time format of "created" and "resolutionDate" to only Date-format and compares the received dates with each other. You can change == to < or >

Note, that you need using plugin (I'm using ScriptRunner)

0 votes

Hi Arunk,

I don't know too much about developing that kind of plugins for JIRA but I do know that ScriptRunner has exactly that feature built-in and much much more:

Hope this helps.



Just needed only the dateCompare function, so we doesn't want to end up buying the paid plugin for this single requirement. Will appreciate if someone can provide the reason for the above mentioned results i am getting while running the JQL Function.

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you