Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.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 使用beforecreate事件创建新的中断_Rally - Fatal编程技术网

Rally 使用beforecreate事件创建新的中断

Rally 使用beforecreate事件创建新的中断,rally,Rally,问题 我试图通过根据不同的组合框值设置字段来绕过rallyaddnew按钮的一个已知问题。这很好,但是有一些组合用户可以输入,而我只能在他们选择创建汇总或功能后才能捕获 问题 我为beforecreate事件创建了一个侦听器,我可以知道何时要阻止创建此portfolioitem。有没有办法阻止它被创建 我现在所做的就是: Ext.Msg.alert('Error', 'You are creating a feature/rollup with invalid options. Please

问题

我试图通过根据不同的组合框值设置字段来绕过rallyaddnew按钮的一个已知问题。这很好,但是有一些组合用户可以输入,而我只能在他们选择创建汇总或功能后才能捕获

问题

我为beforecreate事件创建了一个侦听器,我可以知道何时要阻止创建此portfolioitem。有没有办法阻止它被创建

我现在所做的就是:

Ext.Msg.alert('Error', 'You are creating a feature/rollup with invalid options.  Please delete this record and try again.');

但是,仍然会创建记录

下面是一个示例,其中在板上创建了一张卡,并且根据迭代框中的选择,相应地安排了一个故事。除非满足特定条件,否则会中断新卡的创建。如果满足条件,则返回false:

 return false;
并且未创建新项目:

_onBeforeCreate: function(addNewComponent, record) {
            var currentDate = new Date();
            console.log(this.iterationCombobox.getValue());
                        var startDate = this.iterationCombobox.getRecord().get("StartDate");
            if (startDate > currentDate){
                  console.log("in the future");
                          return false;
            }
            record.set('Iteration', this.iterationCombobox.getValue());
}

工作起来很有魅力。谢谢这是ExtJS和Rally的SDK中的标准模式。从“beforexyz”事件的事件侦听器返回false将停止“xyz”操作。我开始注意到,现在我正在查看SDK-应该第一次捕获它!