[rt-users] groups in alphabetical order...
Ayan R. Kayal
ayan.kayal at yale.edu
Thu Aug 23 17:28:47 EDT 2001
I hacked RT so that the "real" groups (as opposed to pseudo groups) would
show in alphabetical order.
The following subroutine was added to lib/RT/Groups.pm:
# {{{ sub OrderAlpha
=head2 OrderAlpha
Alphabetizes group names.
=cut
sub OrderAlpha {
my $self = shift;
# By default, order by name
return ($self->OrderBy( ALIAS => 'main',
FIELD => 'Name',
ORDER => 'ASC'));
}
# }}}
Then, the line after the "Limit to Real" line was added to index.html in
WebRT/html/Admin/Groups:
my $Groups = new RT::Groups($session{'CurrentUser'});
$Groups->LimitToReal;
** $Groups->OrderAlpha;
</%INIT>
If you modify Groups.pm to add this feature, make sure you stop and
restart Apache so RT sees the change... Cheers...
~ARK
More information about the rt-users
mailing list