Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-6422

Rails stats only shows values of last build, no history

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • rubyMetrics-plugin
    • None

      Instead of moving values for methods and classes, the rails stats graph only shows flat lines. These correspond to the metric values from the last build.

      The source of the problem might be in RailsStatsBuildAction.java. On line 44, instead of iterating over the total entrySet of the current iteration's RailsStatsBuildAction 'a' ('a.getTotal()'), it is always iterated over the total 'total' from the last build:

      39 Map<RailsStatsMetrics, Integer> total = results.getTotal();
      40
      41 for (RailsStatsBuildAction a = this; a != null; a = a.getPreviousResult()) {
      42 ChartUtil.NumberOnlyBuildLabel label = new ChartUtil.NumberOnlyBuildLabel(a.owner);
      43
      44 for (Map.Entry<RailsStatsMetrics, Integer> entry : total.entrySet())

      { 45 dsb.add(entry.getValue(), entry.getKey().prettyPrint(), label); 46 }

      47 }

            david_calavera david_calavera
            z_ z_
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: