Hi Matt,
I inferred the algorithm for status color based on the portfolio item status information and actual colors I see in Rally. The algorithm I came up with follows below. To date, it has match up against the status colors in Rally for the portfolio items I have checked.
_getStatusColor: function(plannedStartDate, actualStartDate, plannedEndDate, actualEndDate, leafStoryEstimate, leafStoryEstimateAccepted){
var app = this;
var statusColor = "";
// Use actual start over planned end date if it exists
if (actualStartDate != null){
var startDate = actualStartDate;
} else {
var startDate = plannedStartDate;
}
if (actualEndDate != null){
var endDate = actualEndDate;
} else {
var endDate = plannedEndDate;
}
// First check - has all work estimated had been accepted?
if (leafStoryEstimate > 0 && leafStoryEstimate == leafStoryEstimateAccepted) {
statusColor = "#0000FF"; (BLUE)
}
// Second check - is planned end date in the past?
if (statusColor == "" && endDate != null){
if (app._dayDiff(new Date(), endDate) < 0){
statusColor = "#FF0000"; (RED)
}
}
if (statusColor == ""){
// Third Check - planned Start Date is not define?
if (startDate == null){
statusColor = "#3CB043"; (GREEN)
} else {
// Fourth Check - planned start date is in the future
if (app._dayDiff(new Date(), startDate) > 0) {
statusColor = "#000000"; (BLACK)
}
}
}
// Planned or Actual Start Date is in the past
if (statusColor == ""){
// Fifth Check - planned end date is not define?
if (plannedEndDate == null ){
statusColor = "#FF0000"; (RED)
} else {
// Default ratio rate - time elapsed verses time left
var ratioRate = app._dayDiff(startDate, new Date()) / app._dayDiff(new Date(), endDate);
// If at least some stories have been estimated then calculate the rate of acceptance required verses actual
if (leafStoryEstimate != 0) {
var idealacceptanceRate = leafStoryEstimate / app._dayDiff(startDate, endDate);
var requiredacceptanceRate = (leafStoryEstimate - leafStoryEstimateAccepted) / app._dayDiff(new Date(), endDate);
if (requiredacceptanceRate != 0){
ratioRate = (requiredacceptanceRate - idealacceptanceRate) / requiredacceptanceRate;
}
}
var RED_LIMIT = 0.4
var YELLOW_LIMIT = 0.2
if (ratioRate > RED_LIMIT){
statusColor = "#FF0000"; // RED
} else {
if (ratioRate > YELLOW_LIMIT){
statusColor = "#f5c71a"; // UofC Gold
} else {
statusColor = "#3CB043"; // Green
}
}
}
}
return statusColor;
}
Original Message:
Sent: Aug 01, 2022 11:44 AM
From: Matt Kelsall
Subject: Re: Color code for portfolio items' progress
Hello all,
We are having difficulty trying to understand how the color code is assigning a color to the % Done fields.
Having followed the calculations listed above to determine the redThreshold & yellowThreshold there still seems to be inconsistencies with the color being assigned.
For example: The following Epic is showing as At-Risk for % Done by Story Count.
The redThreshold calculates as 30.22 & the yellowThreshold calculates as 47.65.
The percentage done by Story Count is 72%.
Would be greatly appreciated if an explanation as to why this Epic is showing At-Risk could be provided, thank you
Original Message:
Sent: Jun 11, 2020 11:26 AM
From: Nik Antonelli
Subject: Re: Color code for portfolio items' progress
Hi Stephen,
I suspect the problem is that there is no bar 'length' to show. The screenshot shows 0/3 stories complete - if there were 1/3 stories complete, you would probably see a red bar going a third of the way across.
PS, it is the bar that gets coloured, not the background.
------------------------------
Nik
Ask me a question, I'm All Ears!
Rally Sales Engineer
Rally Software
Original Message:
Sent: 06-11-2020 09:04 AM
From: Stephen Wingert
Subject: Re: Color code for portfolio items' progress
Christian,
- Is the calculation method exposed through the web services API
- In the code, endDay and startDay are not defined. Are they the values of endDate and startDate respectively?
- Using these values the algorithm calculates red, but Rally displays white. Is there something missing in the code?
- percentDone = 0
- ActualStartDate = 2020-06-09 19:57 EDT
- PlannedStartDate = 2020-05-11 00:00 EDT
- ActualEndDate = null
- PlannedEndDate = 2020-07-31 23:59 EDT
- Attached is a screenshot of the Rally view
Original Message:
Sent: 10-04-2017 06:42 PM
From: Christian J Maldoff
Subject: Re: Color code for portfolio items' progress
Hello Olga,
There is no way to override the algorithm. We provide it to users so they understand how the colors are calculated.
Thank you,
Christian