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

Snippet Generator: missing attribute names in single-entry forms

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline
    • None
    • workflow 1.4..1.8

      Using the snippet generator for the HTML publisher, the generated code, yields an exception:

      hudson.AbortException: Cannot publish the report. Target is not specified
      	at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:64)
      	at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:43)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution.start(AbstractSynchronousStepExecution.java:40)
      

      Follow-up to https://github.com/jenkinsci/htmlpublisher-plugin/pull/15/files#r35805641 ...I suspect a bug in workflow, but probably it has been fixed.

      When a form/class contains only one entry, Snippet Generator provides a code without an attribute name :

      publishHtml([reportName : "", ...])
      

      After that the flow execution calls a constructor with null, because a target is missing. The right call is:

      publishHtml(target: [reportName : "", ...])```
      

      Has this bug been fixed in newer workflow versions? I suspect the answer is "no", but probably I'm doing something wrong in the code

          [JENKINS-29711] Snippet Generator: missing attribute names in single-entry forms

          Oleg Nenashev created issue -
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-30519 [ JENKINS-30519 ]
          Oleg Nenashev made changes -
          Link New: This issue is related to JENKINS-26343 [ JENKINS-26343 ]
          Oleg Nenashev made changes -
          Assignee Original: Jesse Glick [ jglick ] New: Oleg Nenashev [ oleg_nenashev ]
          Jens Wilke made changes -
          Description Original: Follow-up to https://github.com/jenkinsci/htmlpublisher-plugin/pull/15/files#r35805641 ...I suspect a bug in workflow, but probably it has been fixed.

          When a form/class contains only one entry, Snippet Generator provides a code without an attribute name :
          {noformat}
          publishHtml([reportName : "", ...])
          {noformat}

          After that the flow execution calls a constructor with null, because a target is missing. The right call is:
          {noformat}
          publishHtml(target: [reportName : "", ...])```
          {noformat}

          Has this bug been fixed in newer workflow versions? I suspect the answer is "no", but probably I'm doing something wrong in the code
          New: Using the snippet generator for the HTML publisher, the generated code yields in an exception:
          {noformat}
          hudson.AbortException: Cannot publish the report. Target is not specified
          at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:64)
          at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:43)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution.start(AbstractSynchronousStepExecution.java:40)
          {noformat}

          Follow-up to https://github.com/jenkinsci/htmlpublisher-plugin/pull/15/files#r35805641 ...I suspect a bug in workflow, but probably it has been fixed.

          When a form/class contains only one entry, Snippet Generator provides a code without an attribute name :
          {noformat}
          publishHtml([reportName : "", ...])
          {noformat}

          After that the flow execution calls a constructor with null, because a target is missing. The right call is:
          {noformat}
          publishHtml(target: [reportName : "", ...])```
          {noformat}

          Has this bug been fixed in newer workflow versions? I suspect the answer is "no", but probably I'm doing something wrong in the code
          Jens Wilke made changes -
          Description Original: Using the snippet generator for the HTML publisher, the generated code yields in an exception:
          {noformat}
          hudson.AbortException: Cannot publish the report. Target is not specified
          at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:64)
          at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:43)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution.start(AbstractSynchronousStepExecution.java:40)
          {noformat}

          Follow-up to https://github.com/jenkinsci/htmlpublisher-plugin/pull/15/files#r35805641 ...I suspect a bug in workflow, but probably it has been fixed.

          When a form/class contains only one entry, Snippet Generator provides a code without an attribute name :
          {noformat}
          publishHtml([reportName : "", ...])
          {noformat}

          After that the flow execution calls a constructor with null, because a target is missing. The right call is:
          {noformat}
          publishHtml(target: [reportName : "", ...])```
          {noformat}

          Has this bug been fixed in newer workflow versions? I suspect the answer is "no", but probably I'm doing something wrong in the code
          New: Using the snippet generator for the HTML publisher, the generated code, yields an exception:
          {noformat}
          hudson.AbortException: Cannot publish the report. Target is not specified
          at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:64)
          at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:43)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution.start(AbstractSynchronousStepExecution.java:40)
          {noformat}

          Follow-up to https://github.com/jenkinsci/htmlpublisher-plugin/pull/15/files#r35805641 ...I suspect a bug in workflow, but probably it has been fixed.

          When a form/class contains only one entry, Snippet Generator provides a code without an attribute name :
          {noformat}
          publishHtml([reportName : "", ...])
          {noformat}

          After that the flow execution calls a constructor with null, because a target is missing. The right call is:
          {noformat}
          publishHtml(target: [reportName : "", ...])```
          {noformat}

          Has this bug been fixed in newer workflow versions? I suspect the answer is "no", but probably I'm doing something wrong in the code
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-26126 [ JENKINS-26126 ]
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-32674 [ JENKINS-32674 ]
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-34261 [ JENKINS-34261 ]
          Jesse Glick made changes -
          Epic Link New: JENKINS-35393 [ 171186 ]
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-36173 [ JENKINS-36173 ]

            abayer Andrew Bayer
            oleg_nenashev Oleg Nenashev
            Votes:
            12 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved: