[Rt-commit] rt branch, 4.2/dont-recurse-groups-in-role-columnmap, created. rt-4.1.8-559-g740704a
Alex Vandiver
alexmv at bestpractical.com
Thu Jun 6 21:27:51 EDT 2013
The branch, 4.2/dont-recurse-groups-in-role-columnmap has been created
at 740704a3a64d619c266d9b790b259cf50fbf9d31 (commit)
- Log -----------------------------------------------------------------
commit 740704a3a64d619c266d9b790b259cf50fbf9d31
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Jun 6 21:22:27 2013 -0400
Don't expand groups assigned as roles in ticket columnmap
Previous to d8fc54b, the ticket columnmap used
MemberEmailAddressesAsString fr role groups. This method does a
recursive memership lookup, and thus a single large group added as a Cc
would be listed as the entirety of their email addresses. d8fc54b kept
this behavior.
Instead of dispalying a potentially large list of email addresses,
simply display the name of the group instead. This mirrors what the
ticket display page does for such cases.
diff --git a/share/html/Elements/RT__Ticket/ColumnMap b/share/html/Elements/RT__Ticket/ColumnMap
index d1dbc10..6d930d1 100644
--- a/share/html/Elements/RT__Ticket/ColumnMap
+++ b/share/html/Elements/RT__Ticket/ColumnMap
@@ -85,10 +85,16 @@ my $linkUsers;
$linkUsers = sub {
my ($what, $more) = @_;
if ($what->isa("RT::Group")) {
+ # Link the users (non-recursively)
my @ret = map {$linkUsers->($_->[1], $more), ", "}
sort {$a->[0] cmp $b->[0]}
map {+[($_->EmailAddress||''), $_]}
- @{ $what->UserMembersObj->ItemsArrayRef };
+ @{ $what->UserMembersObj( Recursively => 0 )->ItemsArrayRef };
+
+ # But don't link the groups
+ push @ret, map {+("Group: $_", ",")}
+ sort map {$_->Name} @{ $what->GroupMembersObj( Recursively => 0)->ItemsArrayRef };
+
pop @ret; # Remove ending ", "
return @ret;
} else {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list