我正在尝试使用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>发布于 2014-08-02 07:47:40
下面是一个示例:
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);
}
});发布于 2014-08-06 01:32:58
谢谢,尼克。通过将topLevelModel更改为“portfolioitem/ changing”,我让它正常工作。这是最终的代码,供其他需要它的人使用:
<!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>https://stackoverflow.com/questions/25088979
复制相似问题