Forums

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

Jira Query - Time Fields

John Wood
Contributor
May 11, 2020

Hi all,

 

I feel like this should be simple, but I cant figure out how!

 

I have two date/time fields, Requested window start and Requested window end (RWS and RWE from here on)

 

All I want to do is query "where RWE is greater than (RWS+2h)"

 

In other words, where the requested window is more than two hours

 

Any ideas?

1 answer

1 accepted

0 votes
Answer accepted
Derek Fields _RightStar_
Community Champion
May 11, 2020

You can't do this in Jira without a plugin. Scriptrunner has a JQL function called dateCompare that will allow you to compare two dates with a range between them.

https://scriptrunner.adaptavist.com/4.3.1/jira/jql-functions.html#_datecompare

 

This will allow you to write JQL: issueFunction in dateCompare("", "RWE> RWS +2h")

John Wood
Contributor
May 11, 2020

Excellent tyvm, we do have scriptrunner, so good news

Suggest an answer

Log in or Sign up to answer