Use a template to set the contents of the MergedEmails.
Add an admin editable Merged.vm template used to format the contents of the merged change emails. Change-Id: I79823c2135383a7dbf7f245abea3d693db025150
This commit is contained in:
@@ -252,21 +252,27 @@ public abstract class ChangeEmail extends OutgoingEmail {
|
||||
|
||||
/** Format the change message and the affected file list. */
|
||||
protected void formatChangeDetail() {
|
||||
appendText(getChangeDetail());
|
||||
}
|
||||
|
||||
/** Create the change message and the affected file list. */
|
||||
public String getChangeDetail() {
|
||||
StringBuilder detail = new StringBuilder();
|
||||
|
||||
if (patchSetInfo != null) {
|
||||
appendText(patchSetInfo.getMessage().trim());
|
||||
appendText("\n");
|
||||
detail.append(patchSetInfo.getMessage().trim() + "\n");
|
||||
} else {
|
||||
appendText(change.getSubject().trim());
|
||||
appendText("\n");
|
||||
detail.append(change.getSubject().trim() + "\n");
|
||||
}
|
||||
|
||||
if (patchSet != null) {
|
||||
appendText("---\n");
|
||||
detail.append("---\n");
|
||||
for (PatchListEntry p : getPatchList().getPatches()) {
|
||||
appendText(p.getChangeType().getCode() + " " + p.getNewName() + "\n");
|
||||
detail.append(p.getChangeType().getCode() + " " + p.getNewName() + "\n");
|
||||
}
|
||||
appendText("\n");
|
||||
detail.append("\n");
|
||||
}
|
||||
return detail.toString();
|
||||
}
|
||||
|
||||
/** Get the patch list corresponding to this patch set. */
|
||||
|
Reference in New Issue
Block a user