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

Message is missing from REST API

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: tasks-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 1.565.2
      Task Scanner Plug-in 4.42
      Static Analysis Collector Plug-in 1.41
      Static Analysis Utilities 1.59
    • Similar Issues:

      Description

      The XML API does not contain the message. I installed the latest LTS Jenkins and latest TaskScanner (with dependencies) on a test server and set up a very simple job - fetch a file and scan for warnings.

      Output from http://localhost:8080/job/TaskScanner/2/tasksResult/

      File Line Priority Type Message
      MyFile:278 278 Low XXX Make generic
      MyFile:541 541 Low XXX Assign correct drivers

      Output from http://localhost:8080/job/TaskScanner/2/tasksResult/api/xml?depth=1

        <newWarning>
          <fileName>/work/jenkins_test_slave/workspace/TaskScanner/MyFile</fileName>
          <key>4</key>
          <message/>
          <primaryLineNumber>278</primaryLineNumber>
          <priority>LOW</priority>
        </newWarning>
        <newWarning>
          <fileName>/work/jenkins_test_slave/workspace/TaskScanner/MyFile</fileName>
          <key>5</key>
          <message/>
          <primaryLineNumber>541</primaryLineNumber>
          <priority>LOW</priority>
        </newWarning>
      

        Attachments

          Activity

          Hide
          drulli Ulli Hafner added a comment -

          The message is actually stored in the detailMessage property. This property is not yet exposed via API. Would it be sufficient to expose that additional value?

          Show
          drulli Ulli Hafner added a comment - The message is actually stored in the detailMessage property. This property is not yet exposed via API. Would it be sufficient to expose that additional value?
          Hide
          mabahj Markus added a comment -

          Yes, that should not be a problem at all.

          Show
          mabahj Markus added a comment - Yes, that should not be a problem at all.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/hudson/plugins/tasks/parser/Task.java
          http://jenkins-ci.org/commit/tasks-plugin/321bd840a71dea341923a9af0cf8461423152928
          Log:
          [FIXED JENKINS-24708] Also expose 'detailMessage property in remote API.'

          The message property is not used in the tasks plugin, detailMessage contains the actual message.

          Compare: https://github.com/jenkinsci/tasks-plugin/compare/40475e0ee9fc...321bd840a71d

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/tasks/parser/Task.java http://jenkins-ci.org/commit/tasks-plugin/321bd840a71dea341923a9af0cf8461423152928 Log: [FIXED JENKINS-24708] Also expose 'detailMessage property in remote API.' The message property is not used in the tasks plugin, detailMessage contains the actual message. Compare: https://github.com/jenkinsci/tasks-plugin/compare/40475e0ee9fc...321bd840a71d
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          analysis-core
          analysis-pom
          analysis-test
          dry
          findbugs
          pmd
          tasks
          http://jenkins-ci.org/commit/analysis-suite-plugin/281e9de549e0acebe8da9266e1dfec6de88deeac
          Log:
          [FIXED JENKINS-24708] Also expose 'detailMessage property in remote API.'

          The message property is not used in the tasks plugin, detailMessage contains the actual message.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: analysis-core analysis-pom analysis-test dry findbugs pmd tasks http://jenkins-ci.org/commit/analysis-suite-plugin/281e9de549e0acebe8da9266e1dfec6de88deeac Log: [FIXED JENKINS-24708] Also expose 'detailMessage property in remote API.' The message property is not used in the tasks plugin, detailMessage contains the actual message.
          Hide
          mabahj Markus added a comment -

          Thank you!

          There is some delay before plugins are released to us and we don't update continuously. But I'll fetch it as soon as possible and close when verified.

          Show
          mabahj Markus added a comment - Thank you! There is some delay before plugins are released to us and we don't update continuously. But I'll fetch it as soon as possible and close when verified.

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              mabahj Markus
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: