Skip to content

Commit

Permalink
Fix JENKINS-23866
Browse files Browse the repository at this point in the history
Added call to descriptor.save()
  • Loading branch information
slide committed Nov 16, 2014
1 parent b32a26b commit f913d92
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -27,8 +27,8 @@
</repositories>

<scm>
<connection>scm:git:https://github.com/jenkinsci/email-ext-template-plugin.git</connection>
<developerConnection>scm:git:git@github.com:jenkinsci/email-ext-template-plugin.git</developerConnection>
<connection>scm:git:https://github.com/jenkinsci/emailext-template-plugin.git</connection>
<developerConnection>scm:git:git@github.com:jenkinsci/emailext-template-plugin.git</developerConnection>
</scm>

<pluginRepositories>
Expand Down
Expand Up @@ -112,6 +112,7 @@ public HttpResponse doSaveTemplate(StaplerRequest req) {
if(template != null) {
req.bindJSON(template, json);
template.setPublisher(req.bindJSON(ExtendedEmailPublisher.class, json));
descriptor.save();
} else {
template = req.bindJSON(ExtendedEmailPublisherTemplate.class, json);
template.setPublisher(req.bindJSON(ExtendedEmailPublisher.class, json));
Expand All @@ -120,6 +121,7 @@ public HttpResponse doSaveTemplate(StaplerRequest req) {
} catch (ServletException e) {
e.printStackTrace();
}

return new HttpRedirect("index");
}

Expand Down
Expand Up @@ -8,7 +8,6 @@ f = namespace("/lib/form")
d = namespace("jelly:define")


//def templates = hudson.plugins.emailext.plugins.EmailTrigger.all()
def configured = instance != null

f.entry(title: _("Templates"), description: _("The templates to use for sending emails")) {
Expand Down
Expand Up @@ -56,5 +56,4 @@ public void testRemovedTemplate() throws Exception {
assertTrue("Template was removed, so we should get the message",
b.getLog(100).contains(Messages.ExtendedEmailTemplatePublisher_TemplateRemoved(template.getId())));
}

}

0 comments on commit f913d92

Please sign in to comment.