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

StackedArea chart style broken in plot plugin since 2.0.0

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: plot-plugin
    • Labels:
    • Environment:
      Jenkins 2.117, Plot plugin 2.0.3
    • Similar Issues:

      Description

      The StackedArea chart style stopped working after recent updates to the plot plugin and the graph is now simply shown in the default line style.

      After looking into the code base I discovered that the bug is caused by a recent change in creating the charts via hudson.plugins.plot.Plot#createChart and the newly introduced ChartStyle enum.

      The problem is that via the hudson.plugins.plot.Plot.ChartStyle#forName method the given style is now compared case-sensitive while it was previously compare case-insensitive. And it just so happens to be that the StackedArea style is passed via the config as stackedArea (see hudson/plugins/plot/PlotBuilder/config.jelly:41) but the name of the hudson.plugins.plot.Plot.ChartStyle#STACKED_AREA enum is just stackedarea.

      This results in the StackedArea style to be interpreted as LineSimple style, which is not the desired outcome. Fixing this bug could be done via a change to the config file or to the name of the enum. Or just change the comparison to be again case-insensitive as before.

      Thanks in advance for looking into this. It would be great if our graph would work again as expected.

       

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: vgaidarji
          Path:
          src/main/java/hudson/plugins/plot/Plot.java
          src/main/resources/hudson/plugins/plot/PlotBuilder/config.jelly
          http://jenkins-ci.org/commit/plot-plugin/139feff03575821dee52440f19a947489d03dfa8
          Log:
          JENKINS-50924 Fix chart style value comparison

          *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

          Functionality will be removed from GitHub.com on January 31st, 2019.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: vgaidarji Path: src/main/java/hudson/plugins/plot/Plot.java src/main/resources/hudson/plugins/plot/PlotBuilder/config.jelly http://jenkins-ci.org/commit/plot-plugin/139feff03575821dee52440f19a947489d03dfa8 Log: JENKINS-50924 Fix chart style value comparison * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Veaceslav Gaidarji
          Path:
          src/main/java/hudson/plugins/plot/Plot.java
          src/main/resources/hudson/plugins/plot/PlotBuilder/config.jelly
          http://jenkins-ci.org/commit/plot-plugin/0c0c60dc561d58fb95b609f413728cae20c86d1c
          Log:
          Merge pull request #46 from jenkinsci/JENKINS-50924-fix-chart-style-enum

          JENKINS-50924 Fix chart style value comparison

          Compare: https://github.com/jenkinsci/plot-plugin/compare/658edf190cf7...0c0c60dc561d
          *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

          Functionality will be removed from GitHub.com on January 31st, 2019.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Veaceslav Gaidarji Path: src/main/java/hudson/plugins/plot/Plot.java src/main/resources/hudson/plugins/plot/PlotBuilder/config.jelly http://jenkins-ci.org/commit/plot-plugin/0c0c60dc561d58fb95b609f413728cae20c86d1c Log: Merge pull request #46 from jenkinsci/ JENKINS-50924 -fix-chart-style-enum JENKINS-50924 Fix chart style value comparison Compare: https://github.com/jenkinsci/plot-plugin/compare/658edf190cf7...0c0c60dc561d * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.
          Hide
          vgaidarji Veaceslav Gaidarji added a comment -

          Fixed, 2.0.4 version released.

          Show
          vgaidarji Veaceslav Gaidarji added a comment - Fixed, 2.0.4 version released.

            People

            • Assignee:
              vgaidarji Veaceslav Gaidarji
              Reporter:
              stefanv Stefan Victora
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: