diff options
author | James Moger <james.moger@gitblit.com> | 2014-03-10 09:22:04 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-03-10 09:22:04 -0400 |
commit | 4261c190ab9f9483a00d1769e3916ec608ec5391 (patch) | |
tree | 712e1df5a7ee3e0365b1932e6d016e126865e88d /src/main/java/com/gitblit/tickets | |
parent | 57a71dee29f286c7d840fdfcc0b2d98c07f29034 (diff) | |
download | gitblit-4261c190ab9f9483a00d1769e3916ec608ec5391.tar.gz gitblit-4261c190ab9f9483a00d1769e3916ec608ec5391.zip |
Repository owners were not CCd on ticket emails
Diffstat (limited to 'src/main/java/com/gitblit/tickets')
-rw-r--r-- | src/main/java/com/gitblit/tickets/TicketNotifier.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/tickets/TicketNotifier.java b/src/main/java/com/gitblit/tickets/TicketNotifier.java index 6ff76def..48fe051f 100644 --- a/src/main/java/com/gitblit/tickets/TicketNotifier.java +++ b/src/main/java/com/gitblit/tickets/TicketNotifier.java @@ -520,9 +520,16 @@ public class TicketNotifier { // // Direct TO recipients + // reporter & responsible // + Set<String> tos = new TreeSet<String>(); + tos.add(ticket.createdBy); + if (!StringUtils.isEmpty(ticket.responsible)) { + tos.add(ticket.responsible); + } + Set<String> toAddresses = new TreeSet<String>(); - for (String name : ticket.getParticipants()) { + for (String name : tos) { UserModel user = userManager.getUserModel(name); if (user != null && !user.disabled) { if (!StringUtils.isEmpty(user.emailAddress)) { @@ -543,6 +550,11 @@ public class TicketNotifier { // Set<String> ccs = new TreeSet<String>(); + // repository owners + if (!ArrayUtils.isEmpty(repository.owners)) { + tos.addAll(repository.owners); + } + // cc users mentioned in last comment Change lastChange = ticket.changes.get(ticket.changes.size() - 1); if (lastChange.hasComment()) { |