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

book

Article ID: 237550

calendar_today

Updated On:

Products

CA Agile Central SaaS (Rally) CA Agile Central On Premise (Rally) Rally Perpetual Hosted

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.