The syntax in the following queries executed directly in WS API or in a custom grid will not work and shown here as examples only:
(CreationDate < ClosedDate)
(FixedInBuild = FixedInBuild)
(CreationDate < Release.ReleaseStartDate)
The query syntax is not a programming language, and it does not accept variables.
Even though this is a valid syntax:
(Iteration.StartDate <= today)
"today" is a special case and there should be no expectation that in more general cases a right hand side is expected to be anything other than a literal string when using the interactive part of the WS API documentation or
endpoints or custom grids.
However it is be possible to successfully achieve the result expressed by the unsupported syntax used in the examples above as long as it is done in a custom code.
Let's say we want to filter user stories or defects by release and further filter them by CreationDate so that only the stories created prior to the Release StartDate are included in the result.
We can write a custom AppSDK2 app with a Release combobox. When a user selects a release from the dropdown, the code grabs the ReleaseStartDate of that selected release and saves it into a variable (after converting into a ISO format):
var releaseStart = Rally.util.DateTime.toIsoString(release.get('ReleaseStartDate'),true);
{
The code that illustrate this example is availabe in github repo here.
Finally, per WS API documentation:
Query Syntax