I am using the Rally SDK1.33 as in the end I need to display information using the LoginKey outside of Rally. I am trying to query information on PortfolioItem, but it looks like no results are being returned. - However if I put the query in the through the webservice doc pages, I get a result.
Using the following link (replacing 123456789 with a real ObjectID for a PortfolioItem and the workspace 987654321 with a real workspace) I get back the PortfolioItem object:
However if I try to query it from code, I get back the query results without any results and without any errors (again - using a real PortfolioItem ObjectID instead of the 123456789).
ExternalPortfolio
<!--App information-->
<meta name="Name" content="App: ExternalPortfolio"/>
<meta name="Version" content="1.0"/>
<meta name="Vendor" content=""/>
<!--Include SDK-->
<script type="text/javascript" src="https://rally1.rallydev.com/apps/1.33/sdk.js?debug=true&apiVersion=1.43"></script>
<script type="text/javascript">
function onLoad() {
rallyDataSource = new rally.sdk.data.RallyDataSource('__WORKSPACE_OID__',
'__PROJECT_OID__',
'__PROJECT_SCOPING_UP__',
'__PROJECT_SCOPING_DOWN__');
var objectId = 123456789;
var queryConfig = {
type: 'PortfolioItem',
key: 'portfolio',
fetch: 'FormattedID,Name',
query: '(ObjectID = ' + objectId +')'
};
rallyDataSource.findAll(queryConfig, showPortfolio, errorCallBack);
function showPortfolio(results) {
console.log(results);
}
function errorCallBack(response) {
console.log('Got problems!')
console.log(response.Errors);
console.log(response.Warnings);
}
}
rally.addOnLoad(onLoad);
</script>
<style type="text/css">
.externalPortfolio {
/* Add app styles here */
}
</style>
I have created a number of reports on Stories and Defects (most all running outside of Rally), but never for a PortfolioItem. - Am I missing something here? Or is there a severe bug with the v1.xx SDK or v1.x API in handling portfolio items?