Number searcher not filtering by more or less than

Miguel Zapata March 24, 2019

Number searcher not filtering by more or less

 

I created a script custom field with this code to get the hour for created issues

{code:js}
import java.util.Calendar

Calendar cal = Calendar.getInstance();
TimeZone tz = TimeZone.getTimeZone("GMT-3");
cal.setTimeZone(tz);
cal.setTime(issue.created);
cal.get(Calendar.HOUR_OF_DAY)
{code}

When I search for issues, this JQL is not giving results

project = PS AND created >= startOfWeek(-1) AND TimeOfDay >23 AND TimeOfDay <7

 

Custom field configuration is number searcher

 

1 answer

0 votes
Payne
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 Leaders.
March 25, 2019

Your logic is flawed; a number cannot be both > 23 and < 7.

Miguel Zapata March 30, 2019

Yeah, I was thinking like a human, just to reply to my own question what I did was.

 

project = PS AND created >= startOfWeek(-1) AND TimeOfDay >=23 

OR

project = PS AND created >= startOfWeek(-1) AND TimeOfDay <=7

 

Which worked perfect. 

Like Payne likes this

Suggest an answer

Log in or Sign up to answer