We would like to surface the Portfolio Timeline Rally App in our SharePoint site, so upper management can get a good view of where things are in our portfolio, but it doesn’t look like that capability is available. So, as the “next best thing” they would like a list of the porfolio items with start/end dates and a few other fields displayed in a table.
So far, I’ve been able to generate the loginkey for a read-only user, put that in some sample code I found between Rally’s site and SO, and display a list of user stories succesfully:
<script type="text/javascript" src="https://rally1.rallydev.com/apps/1.28/sdk.js?loginKey=[loginkey]"></script>
<script type="text/javascript">
function onLoad() {
rally.sdk.ui.AppHeader.destroy();
var workspaceId = "0123456789";
var projectId = "0123456789";
var rallyDataSource = new rally.sdk.data.RallyDataSource(workspaceId,projectId, 'false', 'true');
var config = {type: "hierarchicalrequirement", columnKeys:["FormattedID", "Name"]};
var table = new rally.sdk.ui.Table(config, rallyDataSource);
table.display("tableDiv");
}
rally.addOnLoad(onLoad);
</script>
That works fine. However, I am running into the following issues:
- If I try to change the config’s type from hierarchicalrequirement to PortfolioItem it does not seem to retrieve anything
- If I try to increase the rev on the sdk.js past 1.28, the rally.addOnLoad does not seem to fire the onLoad event at all and I get some other errors (e.g. RallyDataSource not defined) with the code if I make it fire with my own onLoad event
Am I missing something that is super-obvious? Is there something else I should be using with the 2.0 SDK?
Due to the changes in the Rally Webservices API incorporated to allow for dynamic typing of Portfolio Items, when using AppSDK 1.x, it’s necessary to pair the latest available version of the AppSDK Javascript toolkit (1.32), with Webservices API version 1.37, which handles dynamic typing of PortfolioItems.
The following approach should work with your code:
AppSDK 2.0+ will be the best approach to handle Portfolio Item types moving forward as it will be the preferred and supported Javascript toolkit once it is GA. However, at this time, a “LoginKey-like” functionality is not yet available in AppSDK 2.0 preview – so the above approach should get you by with LoginKey in AppSDK 1.32 for now.