Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Rally 拉力定制看板_Rally_Kanban - Fatal编程技术网

Rally 拉力定制看板

Rally 拉力定制看板,rally,kanban,Rally,Kanban,我只想在看板类型的板上显示当前迭代中的故事/缺陷,以帮助我们的过程 所以我在这里找到了这个例子,并添加了查询行来过滤我的迭代。但是现在我希望它来自rally提供的iterationdropdown框 我将它添加到屏幕上,它显示ok,但我如何将它连接到我的查询 <!DOCTYPE html> <html> <head> <title>My Custom App</title> <!--Inc

我只想在看板类型的板上显示当前迭代中的故事/缺陷,以帮助我们的过程

所以我在这里找到了这个例子,并添加了查询行来过滤我的迭代。但是现在我希望它来自rally提供的iterationdropdown框

我将它添加到屏幕上,它显示ok,但我如何将它连接到我的查询

    <!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>

我的自定义应用程序
onReady(函数(){
Ext.define('CustomApp'{
扩展:“Rally.app.app”,
组件CLS:“应用程序”,
mappedToField:“州”,
mappedFromField:“看板状态”,
fieldNameMap:{
a:“新”,
b:“新”,
c:“定义”,
d:“进行中”,
e:“进行中”,
f:“已完成”,
g:“已完成”,
h:“接受”
},
启动:函数(){
这个。添加({
xtype:'rallyiterationcombobox',
itemId:'iterationComboBox',
});
这个。添加({
X类型:'rallycardboard',
类型:[“缺陷”、“层次要求”],
查询:'Iteration.Name包含“UB Sprint 29”,
属性:this.mappedFromField,
听众:{
beforecarddroppedsave:功能(硬纸板、卡片){
//将此卡上的新状态从映射到新状态
var newState=this.fieldNameMap[card.record.get(this.mappedFromField)];
card.record.set(this.mappedToField,newState);
},
范围:本
}
});
}
});
Rally.launchApp('CustomApp'{
名称:“我的自定义应用”
});
});

如果要按迭代进行筛选,需要向添加一个侦听器,并让它根据当前选定的迭代创建线路板

<!DOCTYPE html>

我的看板迭代

<!--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>

onReady(函数(){
Ext.define('CustomApp'{
扩展:“Rally.app.app”,
组件CLS:“应用程序”,
mappedToField:“州”,
mappedFromField:“看板状态”,
看板:未定义,
fieldNameMap:{
a:“新”,
b:“新”,
c:“定义”,
d:“进行中”,
e:“进行中”,
f:“已完成”,
g:“已完成”,
h:“接受”
},
启动:函数(){
这个。添加({
xtype:'rallyiterationcombobox',
itemId:'iterationComboBox',
听众:{
选择:this.createKanban,
准备好:这个。创建看板,
范围:本
}
});
},
createKanban:函数(组合、记录){
如果(本看板){
这个.kanban.destroy();
}
var过滤器=[];
if(记录长度){
过滤器。推({
属性:“迭代”,
值:记录[0]。获取(“\u ref”)
});
}
this.kanban=this.add({
X类型:'rallycardboard',
类型:[“缺陷”、“层次要求”],
属性:this.mappedFromField,
听众:{
beforecarddroppedsave:功能(硬纸板、卡片){
//将此卡上的新状态从映射到新状态
var newState=this.fieldNameMap[card.record.get(this.mappedFromField)];
card.record.set(this.mappedToField,newState);
},
范围:本
},
storeConfig:{
过滤器:过滤器
}
});
}
});
Rally.launchApp('CustomApp'{
名称:“我的看板迭代”
});
});

谢谢查尔斯,我成功了:)感谢你帮助我们大家。当我完成这一切时,我不会像默认看板那样在卡片上出现缺陷/任务。我环顾四周,找到了其他可能有这种功能的卡片配置,但只看到了rallyartifcatcard,它也没有显示出来。有没有办法使用rally用来获取该信息的看板卡?再次感谢。您正在查看的卡是用于SDK 1.0板的。AppSDK 2.0的下一个版本应该有一些更好的卡功能。如果你不想自己复制它,你可能想等我们完成发布。事实上,我在挖掘了一点之后才发现:)谢谢你的帮助!我将此代码原样添加到自定义html应用程序中,只显示“迭代”下拉列表。