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

Removing (deleting) Email Notification Templates will cause the associated builds to fail.

    Details

    • Similar Issues:

      Description

      Removing (deleting) Email Notification Templates will cause the associated builds to fail until the job is updated to reflect the template is no longer to be used.

      Steps to reproduce:
      1. Create two Templates in Email Notification Templates
      2. Add both Templates to a job, and run job, see success
      3. Edit Email Notification Templates, and remove on of the templates
      4. Run job again, See error

      The Job should not fail because of a missing template, but it still might be good idea to bitch that there is a missing template and then remove it?

        Attachments

          Activity

          Hide
          slide_o_mix Alex Earl added a comment -

          Can you post the build log with the error message? I am thinking you are seeing an NPE or something?

          Show
          slide_o_mix Alex Earl added a comment - Can you post the build log with the error message? I am thinking you are seeing an NPE or something?
          Hide
          mkruer Matthew Kruer added a comment -

          tarted by user anonymous
          Building on master in workspace /var/lib/jenkins/workspace/Step_1_-_Create_Development_Repository

          Deleting project workspace... done

          No emails were triggered.
          FATAL: null
          java.lang.NullPointerException
          at org.jenkinsci.plugins.emailext_template.ExtendedEmailTemplatePublisher.prebuild(ExtendedEmailTemplatePublisher.java:51)
          at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:819)
          at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:814)
          at hudson.model.Build$BuildExecution.doRun(Build.java:142)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:566)
          at hudson.model.Run.execute(Run.java:1665)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:246)

          Show
          mkruer Matthew Kruer added a comment - tarted by user anonymous Building on master in workspace /var/lib/jenkins/workspace/Step_1_-_Create_Development_Repository Deleting project workspace... done No emails were triggered. FATAL: null java.lang.NullPointerException at org.jenkinsci.plugins.emailext_template.ExtendedEmailTemplatePublisher.prebuild(ExtendedEmailTemplatePublisher.java:51) at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:819) at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:814) at hudson.model.Build$BuildExecution.doRun(Build.java:142) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:566) at hudson.model.Run.execute(Run.java:1665) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246)
          Hide
          slide_o_mix Alex Earl added a comment -

          Just as I thought. Should be an easy fix.

          Show
          slide_o_mix Alex Earl added a comment - Just as I thought. Should be an easy fix.
          Hide
          slide_o_mix Alex Earl added a comment -

          Added check in prebuild that was there in perform to make sure the template requested exists. Outputs a warning to the build log instead of crashing.

          Show
          slide_o_mix Alex Earl added a comment - Added check in prebuild that was there in perform to make sure the template requested exists. Outputs a warning to the build log instead of crashing.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Alex Earl
          Path:
          src/main/java/org/jenkinsci/plugins/emailext_template/ExtendedEmailTemplatePublisher.java
          http://jenkins-ci.org/commit/email-ext-template-plugin/7c9af27c8455e30e9818e85b9351720126778e4a
          Log:
          Fix JENKINS-22610

          Added check if the returned value from getTemplateById is null. Write
          error to the build log if the template is missing.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: src/main/java/org/jenkinsci/plugins/emailext_template/ExtendedEmailTemplatePublisher.java http://jenkins-ci.org/commit/email-ext-template-plugin/7c9af27c8455e30e9818e85b9351720126778e4a Log: Fix JENKINS-22610 Added check if the returned value from getTemplateById is null. Write error to the build log if the template is missing.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Alex Earl
          Path:
          src/main/resources/org/jenkinsci/plugins/emailext_template/Messages.properties
          src/test/java/org/jeninsci/plugins/emailext_plugin/ExtendedEmailTemplatePublisherTest.java
          http://jenkins-ci.org/commit/email-ext-template-plugin/eb140463bb9fc0166caf3a5c0dc2f692b8010c6b
          Log:
          Add test for JENKINS-22610

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: src/main/resources/org/jenkinsci/plugins/emailext_template/Messages.properties src/test/java/org/jeninsci/plugins/emailext_plugin/ExtendedEmailTemplatePublisherTest.java http://jenkins-ci.org/commit/email-ext-template-plugin/eb140463bb9fc0166caf3a5c0dc2f692b8010c6b Log: Add test for JENKINS-22610

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              mkruer Matthew Kruer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: