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

Jenkins "Jira Issue Updater Plugin" pasrsing error when "Affects Version/s" is not empty

      In case of Success(Jira issues not mapped with Affected version/s ):
      JIRA Update Results Recorder

      Updating SA-52 Check_52 Finished: SUCCESS

      =====================================

      In case of failure ( Jira issues mapped with Affected version/s):
      JIRA Update Results Recorder

      Unable to parse JSON result: {"expand":"names,schema","startAt":0,"maxResults":1000,"total":1,"issues":[{"expand":"operations,versionedRepresentations,editmeta,changelog,transitions,renderedFields","id":"11274","self":"http://benjira01.tally.tallysolutions.com:8080/rest/api/2/issue/11274","key":"SA-52","fields":{"summary":"Check _52","versions":[

      {"self":"http://benjira01.tally.tallysolutions.com:8080/rest/api/2/version/10505","id":"10505","description":"Demo version","name":"1.0","archived":false,"released":false}

      ]}}]} com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token at [Source: {"expand":"names,schema","startAt":0,"maxResults":1000,"total":1,"issues":[{"expand":"operations,versionedRepresentations,editmeta,changelog,transitions,renderedFields","id":"11274","self":"http://benjira01.tally.tallysolutions.com:8080/rest/api/2/issue/11274","key":"SA-52","fields":{"summary":"Check _52","versions":[

      {"self":"http://benjira01.tally.tallysolutions.com:8080/rest/api/2/version/10505","id":"10505","description":"Demo version","name":"1.0","archived":false,"released":false}

      ]}}]}; line: 1, column: 320](through reference chain: info.bluefloyd.jira.model.IssueSummaryList["issues"]>java.util.ArrayList[0]>info.bluefloyd.jira.model.IssueSummary["fields"]>info.bluefloyd.jira.model.FieldSummary["versions"]>java.util.ArrayList[0])Build step 'JIRA Issue Results Updater' marked build as failure Finished: FAILURE

          [JENKINS-31755] Jenkins "Jira Issue Updater Plugin" pasrsing error when "Affects Version/s" is not empty

          Ian Sparkes added a comment - - edited

          I made a pull request to make the plug in ignore (but accept) properties in the JSON response which are not needed.

          Ian Sparkes added a comment - - edited I made a pull request to make the plug in ignore (but accept) properties in the JSON response which are not needed.

          Ian Sparkes added a comment -

          Probably you can get the update on build success out of the box by simply putting the Jenkins JIRA Issue updater at the right point in the configuration. I generally include Jenkins Jira Issue Updater at least twice in each build: once as a "Build Post Step" to say that I'm going to try to test it, and once as a "Post-build Action" to say that it was built and tested correctly (we use FitNesse for this).

          You might also want to use the "Flexible Publish" plug in if you need finer control of what and when to update.

          Ian Sparkes added a comment - Probably you can get the update on build success out of the box by simply putting the Jenkins JIRA Issue updater at the right point in the configuration. I generally include Jenkins Jira Issue Updater at least twice in each build: once as a "Build Post Step" to say that I'm going to try to test it, and once as a "Post-build Action" to say that it was built and tested correctly (we use FitNesse for this). You might also want to use the "Flexible Publish" plug in if you need finer control of what and when to update.

          Julia Mril added a comment -

          isparkes, do you know who should review and merge your PR https://github.com/jenkinsci/jira-issue-updater-plugin/pull/13 ?

          Julia Mril added a comment - isparkes , do you know who should review and merge your PR https://github.com/jenkinsci/jira-issue-updater-plugin/pull/13 ?

          Code changed in jenkins
          User: ian.sparkes@gmail.com
          Path:
          src/main/java/info/bluefloyd/jira/model/FieldSummary.java
          src/main/java/info/bluefloyd/jira/model/IssueSummary.java
          src/main/java/info/bluefloyd/jira/model/IssueSummaryList.java
          src/main/java/info/bluefloyd/jira/model/PossibleTransition.java
          src/main/java/info/bluefloyd/jira/model/TransitionList.java
          src/main/java/info/bluefloyd/jira/model/VersionSummary.java
          src/test/java/info/bluefloyd/jenkins/ReleaseVersionTest.java
          http://jenkins-ci.org/commit/jira-issue-updater-plugin/be65818ef9f5b4f0ea83c2b0c0f760c7d32b10c3
          Log:
          JENKINS-31755 Allow unknown properties in JIRA model

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ian.sparkes@gmail.com Path: src/main/java/info/bluefloyd/jira/model/FieldSummary.java src/main/java/info/bluefloyd/jira/model/IssueSummary.java src/main/java/info/bluefloyd/jira/model/IssueSummaryList.java src/main/java/info/bluefloyd/jira/model/PossibleTransition.java src/main/java/info/bluefloyd/jira/model/TransitionList.java src/main/java/info/bluefloyd/jira/model/VersionSummary.java src/test/java/info/bluefloyd/jenkins/ReleaseVersionTest.java http://jenkins-ci.org/commit/jira-issue-updater-plugin/be65818ef9f5b4f0ea83c2b0c0f760c7d32b10c3 Log: JENKINS-31755 Allow unknown properties in JIRA model

          Code changed in jenkins
          User: ian.sparkes@gmail.com
          Path:
          pom.xml
          src/main/java/info/bluefloyd/jira/model/FieldSummary.java
          src/main/java/info/bluefloyd/jira/model/IssueSummary.java
          src/main/java/info/bluefloyd/jira/model/IssueSummaryList.java
          src/main/java/info/bluefloyd/jira/model/PossibleTransition.java
          src/main/java/info/bluefloyd/jira/model/TransitionList.java
          src/main/java/info/bluefloyd/jira/model/VersionSummary.java
          src/test/java/info/bluefloyd/jenkins/ReleaseVersionTest.java
          http://jenkins-ci.org/commit/jira-issue-updater-plugin/c7f4cb85132ccc83ad42cc8292140e5812497e18
          Log:
          JENKINS-31755: Ignore unknown properties: releaseDate

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ian.sparkes@gmail.com Path: pom.xml src/main/java/info/bluefloyd/jira/model/FieldSummary.java src/main/java/info/bluefloyd/jira/model/IssueSummary.java src/main/java/info/bluefloyd/jira/model/IssueSummaryList.java src/main/java/info/bluefloyd/jira/model/PossibleTransition.java src/main/java/info/bluefloyd/jira/model/TransitionList.java src/main/java/info/bluefloyd/jira/model/VersionSummary.java src/test/java/info/bluefloyd/jenkins/ReleaseVersionTest.java http://jenkins-ci.org/commit/jira-issue-updater-plugin/c7f4cb85132ccc83ad42cc8292140e5812497e18 Log: JENKINS-31755 : Ignore unknown properties: releaseDate

          Ashish Rathi added a comment -

          Any progress on the same?
          or any workarounds?
          The status still says "in progress"

          Ashish Rathi added a comment - Any progress on the same? or any workarounds? The status still says "in progress"

          Tony Colunga added a comment -

          Was this issue ever resolved? Using plug-in version 1.18 and receiving similar error message that was reported back 3/16/2016:

          com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "releaseDate" (class info.bluefloyd.jira.model.VersionSummary), not marked as ignorable (6 known properties: "archived", "id", "description", "released", "name", "self"])

          Tony Colunga added a comment - Was this issue ever resolved? Using plug-in version 1.18 and receiving similar error message that was reported back 3/16/2016: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "releaseDate" (class info.bluefloyd.jira.model.VersionSummary), not marked as ignorable (6 known properties: "archived", "id", "description", "released", "name", "self"])

          Same here.

           
          com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "releaseDate" (class info.bluefloyd.jira.model.VersionSummary), not marked as ignorable (6 known properties: "archived", "id", "description", "released", "name", "self"])

          Andrew Garland added a comment - Same here.   com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "releaseDate" (class info.bluefloyd.jira.model.VersionSummary), not marked as ignorable (6 known properties: "archived", "id", "description", "released", "name", "self"])

          Tony Colunga added a comment -

          aegarland
          I never got any assistance off of here and noticed that the JIRA Issue Updater Plugin pages (https://wiki.jenkins.io/display/JENKINS/Jira+Issue+Updater+Plugin and https://plugins.jenkins.io/jenkins-jira-issue-updater) listed version 1.18 as being the only version available for download while it is shown on the pages that there is a version 1.20 that fixes this issue.
          I tried getting in touch with the maintainer of the plugin with no success and ended up building a newer version of the plugin myself back in Sepetember (I'm assuming it's version 1.20) using the source code available off of Jenkins git hub (https://github.com/jenkinsci/jira-issue-updater-plugin). After building it (using this page as a reference: https://wiki.jenkins.io/display/JENKINS/Plugin+tutorial) I was then able to get a Jenkins plugin type file (.hpi) that I was then able to install into my Jenkins and I haven't run into the issue since.

          Tony Colunga added a comment - aegarland I never got any assistance off of here and noticed that the JIRA Issue Updater Plugin pages ( https://wiki.jenkins.io/display/JENKINS/Jira+Issue+Updater+Plugin  and https://plugins.jenkins.io/jenkins-jira-issue-updater ) listed version 1.18 as being the only version available for download while it is shown on the pages that there is a version 1.20 that fixes this issue. I tried getting in touch with the maintainer of the plugin with no success and ended up building a newer version of the plugin myself back in Sepetember (I'm assuming it's version 1.20) using the source code available off of Jenkins git hub ( https://github.com/jenkinsci/jira-issue-updater-plugin ). After building it (using this page as a reference: https://wiki.jenkins.io/display/JENKINS/Plugin+tutorial ) I was then able to get a Jenkins plugin type file (.hpi) that I was then able to install into my Jenkins and I haven't run into the issue since.

          tcolunga Thanks for the advice.  It took an amazingly long time to download all of the maven artifacts, but yes, that did the trick!

          Maybe I will take a look at the open PR to allow to append to the custom field instead of over-writing.

          Andrew Garland added a comment - tcolunga Thanks for the advice.  It took an amazingly long time to download all of the maven artifacts, but yes, that did the trick! Maybe I will take a look at the open PR to allow to append to the custom field instead of over-writing.

            isparkes Ian Sparkes
            isparkes Ian Sparkes
            Votes:
            8 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: