Query for Rollups/Features filtering by Parent
I have a list of portfolio items that the user can click on, and when the
user clicks on one, I want to query for the children of that item. I have
the initiatives separate from the the rollups which are separate from the
features, and when it is clicked, I am getting the correct data.
However, When I try to query for its children, I run into problems. Take
the following example.
If a rollup was clicked on, I have tried these queries:
Rally.data.ModelFactory.getModel({
type: 'PortfolioItem/Feature',
success: function(model) {
Ext.create('Rally.data.WsapiDataStore', {
model : model,
limit : Infinity,
fetch : true,
// filters : [{
// property : 'Parent',
// operator : '=',
// value : rollup
// }]
}).load({
callback : function(store) {
console.log('got features');
console.log('first feature',store.getItems()[0]);
}
});
}
});
When I run the query with the filters commented out as shown, then I get
all of the features. However, when I add in the filters, I get nothing
back! I have tried setting the variable Rollup to the rollup's
ObjectID/name, and still nothing. when I console log one of the features,
I can see:
Parent: Object
_rallyAPIMajor: "2"
_rallyAPIMinor: "0"
_ref: "/portfolioitem/rollup/xxxxxxxx"
_refObjectName: "xxxxxxxxxxxxxxxxxxxxxxxx"
_type: "PortfolioItem/Rollup"
and that is it. Furthermore, I know there are portfolio items that meet
the requirements I am trying to express in the filters. How can I filter
out by parent when querying for portfolio items?
No comments:
Post a Comment