拉力赛定制看板 [英] Rally Custom Kanban

查看:82
本文介绍了拉力赛定制看板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想在看板类型板上显示当前迭代中的故事/缺陷,以帮助我们进行处理.

I would like to only show stories/defects from the current iteration on a kanban type board to help with our process.

所以我在SO上找到了这个示例,并添加了QUERY行以过滤出我的迭代.但是现在我希望这来自rally提供的迭代下拉框.

So I found this example out here on SO and added the QUERY line to filter out my iteration. But now I am wanting this to come from the iterationdropdown box provided by rally.

我将其添加到屏幕上,并显示ok,但实际上如何将其连接到我的查询中?

I added it to the screen, and it shows ok, but how do I actually hook it up to my query?

    <!DOCTYPE html>
    <html>
    <head>
    <title>My Custom App</title>

    <!--Include SDK-->
    <script type="text/javascript" src="https://rally1.rallydev.com/apps/2.0p/sdk.js"></script>

    <!--App code-->
    <script type="text/javascript">

        Rally.onReady(function() {

            Ext.define('CustomApp', {
                extend: 'Rally.app.App',
                componentCls: 'app',
                mappedToField:"State",
                mappedFromField:"KanbanState",

                fieldNameMap:{
                   a:"New",
                   b:"New",
                   c:"Defined",
                   d:"In-Progress",
                   e:"In-Progress",
                   f:"Completed",
                   g:"Completed",
                   h:"Accepted"
                },

                launch: function() {
                     this.add({
                        xtype:'rallyiterationcombobox',
                        itemId: 'iterationComboBox',
                    });

                    this.add({
                        xtype:'rallycardboard',
                        types: ["Defect", "HierarchicalRequirement"],
                        query: 'Iteration.Name contains "UB Sprint 29"',
                        attribute: this.mappedFromField,
                        listeners:{
                            beforecarddroppedsave:function(cardboard, card) {
                                //map the new state from on this card to the new state
                                var newState = this.fieldNameMap[card.record.get(this.mappedFromField)];
                                card.record.set(this.mappedToField, newState);
                            },
                            scope:this
                        }
                    });
                }
            });

            Rally.launchApp('CustomApp', {
                name: 'My Custom App'
            });

        });

    </script>


    </head>
    <body class="myApp">
    </body>
    </html>

推荐答案

如果要按迭代进行过滤,则需要在

If you want to filter by iteration you need to add a listener to the iteration combobox and have it create the board based upon the current selected iteration.

<!DOCTYPE html>

我的看板通过迭代

My Kanban by Iteration

<!--Include SDK-->
<script type="text/javascript" src="https://rally1.rallydev.com/apps/2.0p2/sdk.js"></script>

<!--App code-->
<script type="text/javascript">

    Rally.onReady(function() {

        Ext.define('CustomApp', {
            extend: 'Rally.app.App',
            componentCls: 'app',
            mappedToField:"State",
            mappedFromField:"KanbanState",

            kanban:undefined,
            fieldNameMap:{
                a:"New",
                b:"New",
                c:"Defined",
                d:"In-Progress",
                e:"In-Progress",
                f:"Completed",
                g:"Completed",
                h:"Accepted"
            },

            launch: function() {
                this.add({
                    xtype:'rallyiterationcombobox',
                    itemId: 'iterationComboBox',
                    listeners: {
                        select: this.createKanban,
                        ready: this.createKanban,
                        scope: this
                    }
                });
            },
            createKanban:function(combo, records) {
                if (this.kanban) {
                    this.kanban.destroy();
                }
                var filters = [];
                if (records.length) {
                    filters.push({
                        property: 'Iteration',
                        value: records[0].get("_ref")
                    });
                }
                this.kanban = this.add({
                    xtype:'rallycardboard',
                    types: ["Defect", "HierarchicalRequirement"],
                    attribute: this.mappedFromField,
                    listeners:{
                        beforecarddroppedsave:function(cardboard, card) {
                            //map the new state from on this card to the new state
                            var newState = this.fieldNameMap[card.record.get(this.mappedFromField)];
                            card.record.set(this.mappedToField, newState);
                        },
                        scope:this
                    },
                    storeConfig:{
                        filters:filters
                    }
                });
            }
        });

        Rally.launchApp('CustomApp', {
            name: 'My Kanban by Iteration'
        });

    });

</script>

这篇关于拉力赛定制看板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆