relative date query not working properly?
I'm seeing an oddity when doing queries with a Relative Date.
I do a query for all Unresolved work items that have a Creation Date before (including) then 2years and relative date. I get 4,700 work items If I change it to a specific date and pick today I get 3,580 work items It looks like the "2 years relative" says basically only look at the YEAR, as it looks like I get anything in 2011 or earlier, including ones in December 2011, which is actually not 2 older than 2years ago taking into account what day today is. Is this normal? It doesn't seem very logical to me. |
One answer
Hello Susan,
I debugged this area of the code and here is what I observe:
- relative date : specific date = 5 jul 2012 (which is 1 year from now)
we use a timestamp like 2012-07-05 11:32:00.0
- relative date : 1 year ago
we compute a time span like
Start date: 2012-01-01 00:00:00.0
End date: 2012-12-31 23:59:59.999
using RelativeDateVariable#evaluate() method
This might explain the difference in the results you see and that I can also observe on jazz.net.
I guess you would expect the calculated time span to match the timestamp.
I will notify a developer from the Work Item Team so as to provide more insight here.
Thanks.
Eric.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.