Rally Software

 View Only
  • 1.  Color code for portfolio items' progress

    Posted Oct 04, 2017 01:55 PM

    I share portfolio timeline with senior management, and have to explain many times that red doesn't really mean red, it's just Rally assumption... So here are my questions:

    What is the algorithm that Rally uses to color code the portfolio item's progress (green/yellow/red)?  

    Is there a way to change the color setting to just gray? or better yet

    Is there a way to tweak the settings so that the progress colors (yellow/red) are painted based on different algorithm? 



  • 2.  Re: Color code for portfolio items' progress

    Broadcom Employee
    Posted Oct 04, 2017 02:11 PM

    Hello Olga,

     

    Here is a link that will provide more information on how the color algorithm is calculated.

     

    Roadmap Tracking | CA Agile Central Help 

     

    For your reference I have included that information here as well.

     

    Field Coloring

    Both of the % Done fields are colored based on the status of the work needed to complete the portfolio item. This status is calculated using data entered into the Planned Start Date and Planned End Date fields of the portfolio item. See the table below for the meaning of each color.

    ColorMeaning
    Green On Track: Work is being accepted at a sufficient rate to complete the portfolio item before the Planned End Date. This will stay green if the work is completed prior to the Planned End Date. After the Planned End Date, the color will be dark grey if all work has been completed.
    Yellow At Risk: Completing the portfolio item before the Planned End Date is in jeopardy.
    Red Late: Work is not being accepted at a sufficient rate to complete the portfolio item before the Planned End Date, the timeframe has already passed, or an accepted story is added to an unscheduled or unstarted feature.
    White, no shading No work has been accepted.
    Light grey Some work has been accepted, but the current date is prior to the Planned Start Date.
    Dark grey Complete: All work has been accepted and the date the work was completed is in the past.

    Coloring Algorithm

    CA Agile Central uses an algorithm that takes the number of stories, story points (if applicable), current date, dates work is set to Accepted, and Planned start/end date fields into account to generate a colored status indicator. Note that the diagram above does not show work that has been accepted prior to the start date. A light gray color would display for that scenario. The full algorithm is provided below:

    #  Inputs:
    #    percentComplete (real)
    #    startDate (days since the epoch or date type where
    #      Tomorrow()-Today() = 1.0 (real))
    #    endDate (same type as startDate)
    #    asOfDate (same type as startDate) - Most often today. The naming of 
    #      this variable supports the idea that you may want to look
    #      at the report as-of a certain date. All A2.0 reports will
    #      support printing any report as-of a certain timestamp.
    #    acceptanceStartDelay (real representing days) - delay before any
    #      any movement off of 0% complete is expected
    #    warningDelay (real representing days) - width of yellow
    #    inProgress (boolean)

     

    #  Colors:
    #    Red - Late
    #    Green - On Track
    #    Yellow - At Risk
    #    White - Not Started
    #    Light Gray - Some Work Accepted Prior to Start Date
    #    Gray - Complete

     

    # Input parameters for Portfolio Items are calculated as below. 
    # They could be different for Epics
    asOfDay = <today>
    # percentDoneFieldName in the line below could be:
    #   PercentDoneByStoryCount or PercentDoneByStoryPlanEstimate
    percentComplete = 100 * PI[percentDoneFieldName]

     

    if PI.ActualStartDate <> null
      startDate = PI.ActualStartDate
    else if PI.PlannedStartDate <> null
      startDate = PI.PlannedStartDate
    else
      startDate = asOfDay

     

    if PI[percentDoneFieldName] == 1
      if PI.ActualEndDate <> null
        endDate = PI.ActualEndDate
      else if PI.PlannedEndDate <> null
        endDate = PI.PlannedEndDate
      else
        endDate = asOfDay
    else
      if PI.PlannedEndDate <> null
        endDate = PI.PlannedEndDate
      else
        endDate = asOfDay

     

    # Defaults below currently hard-coded. Could later be provided by user.
    acceptanceStartDelay = (endDay - startDay) * 0.2
    warningDelay = (endDay - startDay) * 0.2
    inProgress = percentComplete > 0

     

    if asOfDay < startDay
      return colors.white
       
    if asOfDay >= endDay
      if percentComplete >= 100.0
        return colors.gray
      else
        return colors.red
        
    redXIntercept = startDay + acceptanceStartDelay + warningDelay
    redSlope = 100.0 / (endDay - redXIntercept)
    redYIntercept = -1.0 * redXIntercept * redSlope
    redThreshold = redSlope * asOfDay + redYIntercept
    if percentComplete < redThreshold
      return colors.red
      
    yellowXIntercept = startDay + acceptanceStartDelay
    yellowSlope = 100 / (endDay - yellowXIntercept)
    yellowYIntercept = -1.0 * yellowXIntercept * yellowSlope
    yellowThreshold = yellowSlope * asOfDay + yellowYIntercept
    if percentComplete < yellowThreshold
      return colors.yellow
      
    return colors.green

     

    To determine where your portfolio item is within the red-yellow-green rectangle:

    1. Slide along the x-axis by a percentage of how much time between the actual start date and the projected end date has gone.

      For example, if the portfolio item started on January 1 and it was anticipated to end on January 21 (20 days from January 1) and today is January 11 (10 days from January 1), then 50% of the allowed time is gone and you should stop at the mid-point along the x-axis.

    2. Calculate how much of the project is done by either percentage of completed leaf story count or percentage sum of leaf story points (there are two different status indicators possible).

      For example, there are a total of 20 stories for this portfolio item and 10 of them are done. The portfolio item would be 50% done on the y-axis.

    3. View the chart. The 50% along the x-axis and 50% along the y-axis are clearly in the green area. If the portfolio item were lower on the y-axis (such as 10%), the portfolio item would be in the red zone.

    The algorithm for the red threshold is:

    redXIntercept = startDay + acceptanceStartDelay + warningDelay
    redSlope = 100.0 / (endDay - redXIntercept)
    redYIntercept = -1.0 * redXIntercept * redSlope
    redThreshold = redSlope * asOfDay + redYIntercept

    Assume the following:

    • startDay is 1
    • acceptanceStartDelay defaults to 20% , so 20% of 20 is = 4
    • warningDelay also defaults to 20%, so 20% of 20 = 4
    • endDay is 21
    • asOfDay is 11

    The algorithm becomes:

    redXIntercept = 1 + 4 + 4 = 9
    redSlope = 100.0 / (21 - 9) = 8.33
    redYIntercept = -1.0 * 9 * 8.33 = -74.97
    redThreshold = 8.33 * 11 + -74.97 = 16.67

    Therefore, if your percentage complete is less than 16.67%, the portfolio item would be in the red.

     

    I would be glad to answer any further questions for you if this doesn't make sense.

     

    Thank you,

     

    Christian 



  • 3.  Re: Color code for portfolio items' progress

    Posted Oct 04, 2017 02:26 PM

    Thanks for this reply! Very helpful to know the algorithm.  Is there a way to override it? As in 1) show me everything in the same color or 2) don't make it red if end date is too close and i'm only 20% done? 



  • 4.  RE: Re: Color code for portfolio items' progress

    Posted Jun 04, 2020 11:22 AM
    Hi Christian,
    Where can I see this "red-yellow-green rectangle" you speak of?
    I'm trying to better understand the algorithm behind "Percent Done Field Coloring".

    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/agile-development-and-management/rally-platform-ca-agile-central/rally/using-top/getting-started-rally-portfolio-manager/track-portfolio-items.html

    Cheers,
    Marcin



  • 5.  Re: Color code for portfolio items' progress

    Broadcom Employee
    Posted Oct 04, 2017 06:42 PM

    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 



  • 6.  RE: Re: Color code for portfolio items' progress

    Posted Jun 11, 2020 09:05 AM
      |   view attached
    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



  • 7.  RE: Re: Color code for portfolio items' progress

    Broadcom Employee
    Posted Jun 11, 2020 11:26 AM
    Edited by Nik Antonelli Jun 11, 2020 11:26 AM
    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
    ------------------------------



  • 8.  RE: Re: Color code for portfolio items' progress

    Posted Aug 01, 2022 12:21 PM
    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




  • 9.  RE: Re: Color code for portfolio items' progress

    Posted Aug 03, 2022 12:04 PM
    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;

    }