File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
frontend/src/app/components/key-result-type Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -117,15 +117,18 @@ export class KeyResultTypeComponent implements AfterContentInit {
117117
118118 switch ( field ) {
119119 case KeyResultMetricField . BASELINE : {
120- return { baseline : roundToTwoDecimals ( ( values . targetValue - values . stretchGoal * 0.7 ) / 0.3 ) } ;
120+ return { baseline : roundToTwoDecimals ( ( values . targetValue - values . stretchGoal * 0.7 ) / 0.3 ) ,
121+ commitValue : roundToTwoDecimals ( ( values . stretchGoal - values . baseline ) * 0.3 + values . baseline ) } ;
121122 }
122123
123124 case KeyResultMetricField . TARGET_VALUE : {
124- return { targetValue : roundToTwoDecimals ( ( values . stretchGoal - values . baseline ) * 0.7 + values . baseline ) } ;
125+ return { targetValue : roundToTwoDecimals ( ( values . stretchGoal - values . baseline ) * 0.7 + values . baseline ) ,
126+ commitValue : roundToTwoDecimals ( ( values . stretchGoal - values . baseline ) * 0.3 + values . baseline ) } ;
125127 }
126128
127129 case KeyResultMetricField . STRETCH_GOAL : {
128- return { stretchGoal : roundToTwoDecimals ( ( values . targetValue - values . baseline ) / 0.7 + values . baseline ) } ;
130+ return { stretchGoal : roundToTwoDecimals ( ( values . targetValue - values . baseline ) / 0.7 + values . baseline ) ,
131+ commitValue : roundToTwoDecimals ( ( values . stretchGoal - values . baseline ) * 0.3 + values . baseline ) } ;
129132 }
130133
131134 case KeyResultMetricField . NONE : {
You can’t perform that action at this time.
0 commit comments