Skip to content
Permalink
Browse files

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 79d69e25773c7c1755da3b74cceb7fc976330886
@@ -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;
}

/**
@@ -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") {
@@ -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")
}
}
}
@@ -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();
@@ -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;
}

0 comments on commit 79d69e2

Please sign in to comment.
You can’t perform that action at this time.