首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Rally Portfolio树网格

Rally Portfolio树网格
EN

Stack Overflow用户
提问于 2014-08-02 05:31:19
回答 2查看 462关注 0票数 0

我正在尝试使用SDK创建一个Rally Portfolio Tree Grid。然而,我似乎找不到一个帖子来说明如何做。我看到了用户故事层次结构的例子,但我不能让它与项目组合项目一起工作。你能给我举一个现有的例子吗?或者在这里举个例子?谢谢。

我正在尝试在Rally之外做这件事,所以基于这个例子,这就是我正在尝试的。然而,它并不起作用。有什么建议吗?

代码语言:javascript
复制
<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>
EN

回答 2

Stack Overflow用户

发布于 2014-08-02 07:47:40

下面是一个示例:

代码语言:javascript
复制
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);
    }
});
票数 0
EN

Stack Overflow用户

发布于 2014-08-06 01:32:58

谢谢,尼克。通过将topLevelModel更改为“portfolioitem/ changing”,我让它正常工作。这是最终的代码,供其他需要它的人使用:

代码语言:javascript
复制
<!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>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25088979

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档