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 created issue -
          Ian Sparkes made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Code changed in jenkins
          User: Ian Sparks
          Path:
          README
          src/main/java/info/bluefloyd/jira/model/FieldSummary.java
          src/main/java/info/bluefloyd/jira/model/VersionSummary.java
          src/test/java/info/bluefloyd/jenkins/FieldSummaryTest.java
          http://jenkins-ci.org/commit/jira-issue-updater-plugin/9b31cf9c5efef8296b048abed2277d78b51bdeec
          Log:
          JENKINS-31755: Add Version information to model

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ian Sparks Path: README src/main/java/info/bluefloyd/jira/model/FieldSummary.java src/main/java/info/bluefloyd/jira/model/VersionSummary.java src/test/java/info/bluefloyd/jenkins/FieldSummaryTest.java http://jenkins-ci.org/commit/jira-issue-updater-plugin/9b31cf9c5efef8296b048abed2277d78b51bdeec Log: JENKINS-31755 : Add Version information to model

          Code changed in jenkins
          User: Laszlo Miklosik
          Path:
          README
          src/main/java/info/bluefloyd/jira/model/FieldSummary.java
          src/main/java/info/bluefloyd/jira/model/VersionSummary.java
          src/test/java/info/bluefloyd/jenkins/FieldSummaryTest.java
          http://jenkins-ci.org/commit/jira-issue-updater-plugin/236b057623bd4c349079d1855063cbb8dd40f109
          Log:
          Merge pull request #11 from isparkes/master

          JENKINS-31755: Add Version information to model

          Compare: https://github.com/jenkinsci/jira-issue-updater-plugin/compare/def48689b2b4...236b057623bd

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Laszlo Miklosik Path: README src/main/java/info/bluefloyd/jira/model/FieldSummary.java src/main/java/info/bluefloyd/jira/model/VersionSummary.java src/test/java/info/bluefloyd/jenkins/FieldSummaryTest.java http://jenkins-ci.org/commit/jira-issue-updater-plugin/236b057623bd4c349079d1855063cbb8dd40f109 Log: Merge pull request #11 from isparkes/master JENKINS-31755 : Add Version information to model Compare: https://github.com/jenkinsci/jira-issue-updater-plugin/compare/def48689b2b4...236b057623bd

          Ashish Rathi added a comment -

          I am also facing this problem:

          JIRA Update Build Step
          -------------------------------------------------------
          Unable to parse JSON result: {"expand":"names,schema","startAt":0,"maxResults":1000,"total":1,"issues":[{"expand":"operations,versionedRepresentations,editmeta,changelog,transitions,renderedFields","id":"289777","self":"https://tallyjira.tallysolutions.com/rest/api/2/issue/289777","key":"TE-25246","fields":{"summary":"VAT Internal - TIN is not getting updated in Ledger even after incorrect TIN matches with Master.","versions":[

          {"self":"https://tallyjira.tallysolutions.com/rest/api/2/version/12443","id":"12443","description":"Series A Release 5.0","name":"Series A Release 5.0","archived":false,"released":true,"releaseDate":"2015-08-03"}

          ]}}]}
          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"])
          at [Source: {"expand":"names,schema","startAt":0,"maxResults":1000,"total":1,"issues":[{"expand":"operations,versionedRepresentations,editmeta,changelog,transitions,renderedFields","id":"289777","self":"https://tallyjira.tallysolutions.com/rest/api/2/issue/289777","key":"TE-25246","fields":{"summary":"VAT Internal - TIN is not getting updated in Ledger even after incorrect TIN matches with Master.","versions":[

          {"self":"https://tallyjira.tallysolutions.com/rest/api/2/version/12443","id":"12443","description":"Series A Release 5.0","name":"Series A Release 5.0","archived":false,"released":true,"releaseDate":"2015-08-03"}

          ]}}]}; line: 1, column: 603] (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]->info.bluefloyd.jira.model.VersionSummary["releaseDate"])

          Seems like an issue with the releaseDate attribute of the affects version field in JIRA.

          Ashish Rathi added a comment - I am also facing this problem: JIRA Update Build Step ------------------------------------------------------- Unable to parse JSON result: {"expand":"names,schema","startAt":0,"maxResults":1000,"total":1,"issues":[{"expand":"operations,versionedRepresentations,editmeta,changelog,transitions,renderedFields","id":"289777","self":"https://tallyjira.tallysolutions.com/rest/api/2/issue/289777","key":"TE-25246","fields":{"summary":"VAT Internal - TIN is not getting updated in Ledger even after incorrect TIN matches with Master.","versions":[ {"self":"https://tallyjira.tallysolutions.com/rest/api/2/version/12443","id":"12443","description":"Series A Release 5.0","name":"Series A Release 5.0","archived":false,"released":true,"releaseDate":"2015-08-03"} ]}}]} 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"]) at [Source: {"expand":"names,schema","startAt":0,"maxResults":1000,"total":1,"issues":[{"expand":"operations,versionedRepresentations,editmeta,changelog,transitions,renderedFields","id":"289777","self":"https://tallyjira.tallysolutions.com/rest/api/2/issue/289777","key":"TE-25246","fields":{"summary":"VAT Internal - TIN is not getting updated in Ledger even after incorrect TIN matches with Master.","versions":[ {"self":"https://tallyjira.tallysolutions.com/rest/api/2/version/12443","id":"12443","description":"Series A Release 5.0","name":"Series A Release 5.0","archived":false,"released":true,"releaseDate":"2015-08-03"} ]}}]}; line: 1, column: 603] (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] ->info.bluefloyd.jira.model.VersionSummary ["releaseDate"] ) Seems like an issue with the releaseDate attribute of the affects version field in JIRA.

          Ian Sparkes added a comment -

          Yes, that's a problem. I'll mark the unused properties that we might get back as ignored.

          Ian Sparkes added a comment - Yes, that's a problem. I'll mark the unused properties that we might get back as ignored.

          Ashish Rathi added a comment -

          Thanks for the prompt reply!!
          I am relatively new to Jenkins and thus wanted to know if there is a way to update JIRA issues only when the build process is success.
          i.e. skip updating JIRA issues, in case of a build failure.

          Ashish Rathi added a comment - Thanks for the prompt reply!! I am relatively new to Jenkins and thus wanted to know if there is a way to update JIRA issues only when the build process is success. i.e. skip updating JIRA issues, in case of a build failure.

          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 ?

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

              Created:
              Updated: