The “$lt” or “$gt” operators not working as expected for LBAPI queries on State for Portfolio Items.

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

 

The LBAPI service evaluates the State object for portfolio items based off of the State’s ObjectID instead of using the Name or Index. This can make it a bit complicated when trying to use operators such as $lt or $gt, especially if you have created your own custom states. In order to use these type of operators sucessfully it is best to find the ObjectIDs for all of the States related to the Portfolio Item type so you know how to best construct your query using those operators.

 

The following example shows how to get a list of State ObjectIDs for portfolioitem/initiative.

Instructions:

 

  • While logged into CA Agile Central with the correct Workspace selected, navigate to the interactive webservices document.

  • Run a query on the State object and then search the results for the initiative typedef. (Browser search for Initiative and find the _ref for TypeDef object, see below)

Typedef.png

State_Query.png

  • Re-run the State query using the _ref from the Initiative, in this case ( typedef = "https://rally1.rallydev.com/slm/webservice/v2.0/typedefinition/55948511509" )

State_typdef_query.png

  • Build your list of State Names and ObjectIDs, below is one custom created State for Initiative.

SeanProgress_State.png

Now you can build your LBAPI query using the ObjectIDs for State using the necessary operators.