Examples of queries by ScheduleState

Document ID : KB000057599
Last Modified Date : 14/02/2018
Show Technical Document Details


A user queries by "Schedule State" and does not see expected results.


The name of the field must be spelled exactly as it appears in the Web Services API document: two capital letters in the beginning of each word, and no spaces:

User-added image

Notice that the ScheduleState field is inherited by HierarchicalRequirement or Defect objects from SchedulableArtifact abstract type, which is a child type of Artifacat abstract type.

Below is an example of a query in a custom grid:
((ScheduleState != Accepted)AND(ScheduleState != Completed))

User-added image

And the data returned:

User-added image

The identical result is returned by a simpler query that uses less than operator:

(ScheduleState < Completed)

User-added image

One of the custom grid's limitations is that its results are limited to one page, and the max page size is 200 (default 20). If you expect more results than 200, a custom app written with AppSDK2 may be more appropriate as long as you are comfortable with javascript or can leverage internal resources for that. Another option is to issue queries directly in the WS API interactive document:
The screenshot below shows a query:
(ScheduleState != Accepted)

User-added image

Here is the result:
User-added image
An equivalent of this query is this URL, modified to fetch Parent and Iteration fields can be pasted directly in the browser's address bar. Make sure to use workspace ObjectID valid in your subscription, and not?21030602576.See this article for more details.

https://rally1.rallydev.com/slm/webservice/v2.0/hierarchicalrequirement?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/21030602576&query=(ScheduleState != Accepted)&pagesize=200&fetch=Parent,Iteration

Here is a fragment of a result that shows one of the returned objects:
If you need to page add start query parameter. This example shows the query that returns the second page of the results. Since max page size is 200, the second page starts with index 201:

https://rally1.rallydev.com/slm/webservice/v2.0/hierarchicalrequirement?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/21030602576&query=(ScheduleState != Accepted)&pagesize=200&fetch=Parent,Iteration&start=201

So far this query was used in a custom grid and in WS API interactive documentation, but it is also possible to create a custom view in Rally.

We create a custom view on Plan>User Stories summary page as follows:
User-added image

and observe the returned results both in the tree view:

User-added image
and the list view:

User-added image
The results are the same, only the representation is different.

We already noticed that there is no need to use a query with two conditions
((ScheduleState != Accepted)AND(ScheduleState != Completed)

while the equivalent query with one condition?(ScheduleState < Completed) returns the same result,but for the sake of completeness, here is the same custom view modified to use two conditions with AND operator:

User-added image

and the resulting grid in the tree view:

User-added image

NOTE: custom views follow global project scoping. One of the four stories displayed in the grids above is located in a child project of the top (currently selected) project. Notice that the grid shows only three stories when we do not scope down to child projects:

User-added image
but shows all four stories when we scope to child project:

User-added image