From 6add177648dba27e4298eac457d23ea4c1ca3304 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 15 Jun 2017 14:30:59 +0300 Subject: [PATCH] Soy: Extend shortSubject to 72 chars The default wrap value is 72. Conform to that. Change-Id: I6ca5824831a48e90e1b697fb153102c7e38adbd8 --- Documentation/config-mail.txt | 2 +- .../java/com/google/gerrit/server/mail/send/ChangeEmail.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/config-mail.txt b/Documentation/config-mail.txt index 1adc8d9764..af2bd98898 100644 --- a/Documentation/config-mail.txt +++ b/Documentation/config-mail.txt @@ -201,7 +201,7 @@ The subject corresponding to the first patch set of the current change. $change.shortSubject:: + -The subject limited to 63 characters, with an ellipsis if it exceeds that. +The subject limited to 72 characters, with an ellipsis if it exceeds that. $change.ownerEmail:: + diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/mail/send/ChangeEmail.java b/gerrit-server/src/main/java/com/google/gerrit/server/mail/send/ChangeEmail.java index bc09488e1d..37533343dd 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/mail/send/ChangeEmail.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/mail/send/ChangeEmail.java @@ -458,10 +458,10 @@ public abstract class ChangeEmail extends NotificationEmail { changeData.put("subject", subject); // shortSubject is the subject limited to 63 characters, with an ellipsis if // it exceeds that. - if (subject.length() < 64) { + if (subject.length() < 73) { changeData.put("shortSubject", subject); } else { - changeData.put("shortSubject", subject.substring(0, 60) + "..."); + changeData.put("shortSubject", subject.substring(0, 69) + "..."); } Map patchSetData = new HashMap<>();