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

NPE with new custom field feature

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Jenkins version: 1.578
      Jira Issue Updater version: 1.10
    • Similar Issues:

      Description

      After upgrade to version 1.10, jobs that ran fine before now fail with this NPE:

      11:47:01 FATAL: null
      11:47:01 java.lang.NullPointerException
      11:47:01 	at info.bluefloyd.jenkins.IssueUpdatesBuilder.updateIssueField(IssueUpdatesBuilder.java:355)
      11:47:01 	at info.bluefloyd.jenkins.IssueUpdatesBuilder.perform(IssueUpdatesBuilder.java:225)
      11:47:01 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      11:47:01 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      11:47:01 	at hudson.model.Build$BuildExecution.build(Build.java:199)
      11:47:01 	at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      11:47:01 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
      11:47:01 	at hudson.model.Run.execute(Run.java:1740)
      11:47:01 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      11:47:01 	at hudson.model.ResourceController.execute(ResourceController.java:89)
      11:47:01 	at hudson.model.Executor.run(Executor.java:240)
      

      Looks like this commit doesn't check whether a custom field id is not null, before trying to use it:

      https://github.com/jenkinsci/jira-issue-updater-plugin/commit/a9bfbc844964eac69182ff6549b09d376a494a03

      Specifically here:

      https://github.com/jenkinsci/jira-issue-updater-plugin/blob/master/src/main/java/info/bluefloyd/jenkins/IssueUpdatesBuilder.java#L355

        Attachments

          Activity

          Hide
          laszlomiklosik Laszlo Miklosik added a comment -

          Hi Mark,

          thanks for reporting the issue. The problem was fixed meanwhile thanks to Hua Zhang!
          (see pull request: https://github.com/hzh/jira-issue-updater-plugin/commit/6e44f4fc666c2d6e2b05afd3f1bef23fea8e2745)

          I will release a new version in today and that should become available in 1-2 days.

          Regards,
          Laszlo Miklosik

          Show
          laszlomiklosik Laszlo Miklosik added a comment - Hi Mark, thanks for reporting the issue. The problem was fixed meanwhile thanks to Hua Zhang! (see pull request: https://github.com/hzh/jira-issue-updater-plugin/commit/6e44f4fc666c2d6e2b05afd3f1bef23fea8e2745 ) I will release a new version in today and that should become available in 1-2 days. Regards, Laszlo Miklosik
          Hide
          laszlomiklosik Laszlo Miklosik added a comment -

          Just released a new version containing the fix.

          http://maven.jenkins-ci.org:8081/content/repositories/releases/info/bluefloyd/jenkins/jenkins-jira-issue-updater/1.11/jenkins-jira-issue-updater-1.11.jar

          It will appear in ~6h in the update center of your Jenkins.

          Show
          laszlomiklosik Laszlo Miklosik added a comment - Just released a new version containing the fix. http://maven.jenkins-ci.org:8081/content/repositories/releases/info/bluefloyd/jenkins/jenkins-jira-issue-updater/1.11/jenkins-jira-issue-updater-1.11.jar It will appear in ~6h in the update center of your Jenkins.

            People

            Assignee:
            markleith Mark Leith
            Reporter:
            markleith Mark Leith
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: