我正在尝试使用SDK创建Rally Portfolio Tree Grid。但是,我似乎无法找到一个指示如何的帖子。我看到了用户故事层次结构示例,但我无法使用它来处理项目组合项目。你能指点我一个现有的例子吗?或者举一个例子?感谢。
我试图在Rally之外做这个,所以基于这个例子,这就是我正在尝试的。但是,它不起作用。建议?
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Portfolio Grid Example</title>
<script type="text/javascript" src="https://rally1.rallydev.com/apps/2.0rc3/sdk.js"></script>
<script type="text/javascript">
Rally.onReady(function() {
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
items:{ html:'<a href="https://help.rallydev.com/apps/2.0rc3/doc/">App SDK 2.0rc3 Docs</a>'},
launch: function() {
var treeview = Ext.create('Rally.data.wsapi.TreeStoreBuilder').build({
items: [{
xtype: 'rallyportfoliotree',
topLevelModel: 'portfolioitem/theme',
topLevelStoreConfig: {
fetch: true,
context: {
workspace: "/workspace/7279590206", // use valid OID
project : "/project/9400054800",
projectScopeDown: true
}
}
}]
});
this.add(treeview);
}
});
Rally.launchApp('CustomApp', {
name: 'Portfolio Grid Example',
});
});
</script>
</head>
<body>
</body>
</html>
答案 0 :(得分:0)
以下是一个例子:
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
items:{ html:'<a href="https://help.rallydev.com/apps/2.0rc3/doc/">App SDK 2.0rc3 Docs</a>'},
launch: function() {
var treeview = Ext.create('Ext.Container', {
items: [{
xtype: 'rallyportfoliotree',
topLevelModel: 'portfolioitem/theme',
topLevelStoreConfig: {
fetch: true,
context: {
workspace: "/workspace/111", // use valid OID
project : "/project/222",
projectScopeDown: true
}
}
}]
});
this.add(treeview);
}
});
答案 1 :(得分:0)
谢谢尼克。通过将topLevelModel更改为“portfolioitem / strategicinitiative”,我得到了它的工作。以下是其他任何需要它的人的最终代码:
<!DOCTYPE html>
<html>
<head>
<title>PI Tree Example</title>
<script type="text/javascript" src="https://rally1.rallydev.com/apps/2.0rc3/sdk.js"></script>
<script type="text/javascript">
Rally.onReady(function () {
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
items:{ html:'<a href="https://help.rallydev.com/apps/2.0rc3/doc/">App SDK 2.0rc3 Docs</a>'},
launch: function() {
var treeview = Ext.create('Ext.Container', {
items: [{
xtype: 'rallyportfoliotree',
topLevelModel: 'portfolioitem/strategicinitiative',
topLevelStoreConfig: {
fetch: true,
context: {
workspace: "/workspace/111", // NMDS
project : "/project/222", // Company X
projectScopeDown: true
}
}
}]
});
this.add(treeview);
}
});
Rally.launchApp('CustomApp', {
name:"PI Tree Example",
parentRepos:""
});
});
</script>
<style type="text/css">
.app {
/* Add app styles here */
}
</style>
</head>
<body></body>
</html>