Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #132 from weisslj/fix-postsend-script-setting
Fix JENKINS-33205 (disappearing post-send script project setting)
  • Loading branch information
slide committed Mar 1, 2016
2 parents ab29624 + 1832ae0 commit 79d69e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Expand Up @@ -206,8 +206,8 @@ public ExtendedEmailPublisher(String project_recipient_list, String project_cont
}

@DataBoundSetter
public void setPostsendScript(String project_postsend_script) {
this.postsendScript = project_postsend_script;
public void setPostsendScript(String postsendScript) {
this.postsendScript = postsendScript;
}

/**
Expand Down
Expand Up @@ -60,7 +60,7 @@ f.advanced(title: _("Advanced Settings")) {
f.textarea(id: "project_presend_script", name: "project_presend_script", value: configured ? instance.presendScript : "\$DEFAULT_PRESEND_SCRIPT", class: "setting-input")
}
f.entry(title: _("Post-send Script"), help: "/plugin/email-ext/help/projectConfig/postsendScript.html") {
f.textarea(id: "project_postsend_script", name: "project_postsend_script", value: configured ? instance.postsendScript : "\$DEFAULT_POSTSEND_SCRIPT", class: "setting-input")
f.textarea(id: "postsendScript", name: "postsendScript", value: configured ? instance.postsendScript : "\$DEFAULT_POSTSEND_SCRIPT", class: "setting-input")
}
f.entry(title: _("Additional groovy classpath"), help: "/plugin/help/projectConfig/defaultClasspath.html") {
f.repeatable(field: "classpath") {
Expand Down Expand Up @@ -89,4 +89,4 @@ f.advanced(title: _("Advanced Settings")) {
f.entry(title: _("Triggers"), help: "/plugin/email-ext/help/projectConfig/addATrigger.html") {
f.hetero_list(name: "project_triggers", hasHeader: true, descriptors: triggers, items: configuredTriggers, addCaption:_("Add Trigger"), deleteCaption: _("Remove Trigger"), capture: "showSendTo")
}
}
}
Expand Up @@ -998,7 +998,7 @@ public Void call() throws Exception {
form.put("project_default_content", "Give me a $1000 check and I'll mail you back $5000!!!");
form.put("project_attachments", "");
form.put("project_presend_script", "");
form.put("project_postsend_script", "");
form.put("postsendScript", "println 1");
form.put("project_replyto", "");

ExtendedEmailPublisherDescriptor descriptor = new ExtendedEmailPublisherDescriptor();
Expand All @@ -1010,6 +1010,7 @@ public Void call() throws Exception {
assertEquals("Give me a $1000 check and I'll mail you back $5000!!!", publisher.defaultContent);
assertEquals("", publisher.attachmentsPattern);
assertEquals("", publisher.replyTo);
assertEquals("println 1", publisher.postsendScript);

return null;
}
Expand Down

0 comments on commit 79d69e2

Please sign in to comment.