From df5b1e8011341b3ed64a9454ecf41b718d06dce1 Mon Sep 17 00:00:00 2001 From: Charlie Groves Date: Mon, 9 Jun 2014 09:43:13 -0700 Subject: [PATCH] Use the project's full display name in the message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously it was using display name. The difference is for projects nested in folders. getDisplayName returns the last segment there, whereas getFullDisplayName includes all the parent folders as well, separated by ยป. For projects not in folders, they're identical. We have several builds with the same final segment name that are only different based on the folder they're in. This works much better for that. --- src/main/java/jenkins/plugins/hipchat/ActiveNotifier.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/jenkins/plugins/hipchat/ActiveNotifier.java b/src/main/java/jenkins/plugins/hipchat/ActiveNotifier.java index 6576ec3..a5fc3c1 100644 --- a/src/main/java/jenkins/plugins/hipchat/ActiveNotifier.java +++ b/src/main/java/jenkins/plugins/hipchat/ActiveNotifier.java @@ -165,7 +165,7 @@ public MessageBuilder append(Object string) { } private MessageBuilder startMessage() { - message.append(build.getProject().getDisplayName()); + message.append(build.getProject().getFullDisplayName()); message.append(" - "); message.append(build.getDisplayName()); message.append(" ");