ストーリー数と計画見積もりの色分けアルゴリズムによって行われたラリー率に関連していますが、ここで未回答の部分を尋ねます。
SDK 2.0のPercent Done UI コンポーネントは、rally で使用されるアルゴリズムに従ってカードを色付けしません (パーセンテージに基づいて色分けするだけです)。この機能を Rally の機能に合わせて変更するためのカラー コーディング機能またはレンダリング機能を提供する方法はありますか? ありがとう!
[編集] - 既存の機能をオーバーライドして、UI コンポーネントを生成するために行われたパーセントではなくレコードを使用しようとしています
Ext.define('Custom.PercentDone', {
requires: ['Rally.ui.renderer.template.progressbar.PortfolioItemPercentDoneTemplate', 'Rally.util.HealthColorCalculator'],
extend : 'Rally.ui.PercentDone',
alias : 'widget.cpercentdone',
config: {
record: null
},
constructor: function(config) {
this.initConfig(config);
config = this.config;
this.renderTpl = Ext.create('Custom.renderer.template.progressbar.PercentDoneTemplate', {
calculateColorFn: Ext.bind(function(recordData) {
console.log('called my custom coloring fn');
var colorObject = Rally.util.HealthColorCalculator.calculateHealthColorForPortfolioItemData(config.record, config.percentDoneName);
return colorObject.hex;
}, this)
});
this.renderData = config;
this.mergeConfig(config);
this.callParent([this.config]);
}
});
App.down('#subContainer').add({
xtype: 'cpercentdone',
record: item,
useStoryCount: !App.estimate
});
正しく動作させることができません - calculateHealthColorForPortfolioItemData関数に情報を渡したいのですが、どのパラメーターがどこに渡されているのかがよくわからないため、何をどこに設定すればよいかわかりません。
私も Ext.override を使ってみました:
var percentDone = Ext.create('Rally.ui.PercentDone', {
record: item,
percentDoneName: 'PercentDoneByStoryCount'
});
var tpl = percentDone.renderTpl;
tpl.calculateColorFn = function(recordData) {
var colorObject = Rally.util.HealthColorCalculator.calculateHealthColorForPortfolioItemData(percentDone.record, percentDone.percentDoneName);
return colorObject.hex;
};
Ext.override(percentDone, {
renderTpl: tpl
});
App.down('#subContainer').add(percentDone);