Rally WSAPI query with the (date_field > today-n) returns unexpected data
search cancel

Rally WSAPI query with the (date_field > today-n) returns unexpected data

book

Article ID: 237550

calendar_today

Updated On:

Products

Rally SaaS Rally On-Premise

Issue/Introduction

When using a query such as (date_field > today-n) no data is returned or unexpected results are received.

Cause

Using the greater than operator with the today expression changes how the comparison is performed in the database.  Instead of creating a date range expression that starts as today's date minus n days, it treats it as simply today's date so it looks forward into the future starting at today's date.

Resolution

Use (some_field >= today-n) which will look back n days from today and into the future.