问题
Related to Progress Bars for Portfolio Items, but now we have the SDK 2.0
Is there a way to see the algorithm for displaying percent done by story count and percent done by story plan estimate?
I have an attempt which is close, and works in most cases, but sometimes when I compare it to the actual information in rally, the colors differ. I would like this to be consistent for my app:
if (recordData.PercentDoneByStoryPlanEstimate === 1) { //All work has been accepted
return App.colorCodes.grey;
} else if (dateDifference <= 0) { //End date has passed and work is not complete
return App.colorCodes.blank;
} else {
if (daysSinceStart / dateDifference <= recordData.PercentDoneByStoryPlanEstimate) return App.colorCodes.green; //On-track
else if (daysSinceStart / dateDifference <= recordData.PercentDoneByStoryPlanEstimate + 0.25) return App.colorCodes.yellow; //Within 25% of planned velocity
else return App.colorCodes.red; //Off-track, not within 10%
}
Also, the Percent Done ui component in the SDK 2.0 does not color the cards correctly either, and there is no way to provide a custom coloring function - I can provided a percentage, but can I get it to display like a native rally percent done would?
回答1:
If you want to see how the math is generated for the Percent Done component you can see the Health Color Calculator or look directly at the source. These components should show the calculations as they are represented in Rally (since this is the code we use!).
来源:https://stackoverflow.com/questions/18221134/rally-percent-done-by-story-count-and-plan-estimate-color-coding-algorithm