Help reverting RT 3.8.6 back to displaying username instead of RealName

Hi,

Just updated to RT 3.8.6, all looks well but on rt 3.8.0 all users were
listed in select box and transaction history as username i.e aguise for
myself. RT 3.8.6 is displaying the full name (Aaron Guise) . Our users
are so used to the old format and they really want it back. Can someone
point me to the file in which I can amend this? I found this snippet in
RT_Config.pm and basically I need to find the procedure is so I can alter it
to get the username instead.

Any help would be greatly appreciated.

=item C<$UsernameFormat>

This determines how user info is displayed. ‘concise’ will show one of
either NickName, RealName, Name or EmailAddress, depending on what exists
and whether the user is privileged or not. ‘verbose’ will show RealName and
EmailAddress.

=cut

Set($UsernameFormat, ‘concise’);

Regards,

Aaron

Hi,

Just updated to RT 3.8.6, all looks well but on rt 3.8.0 all users were
listed in select box and transaction history as username i.e aguise for
myself. RT 3.8.6 is displaying the full name (Aaron Guise) . Our users
are so used to the old format and they really want it back. Can someone
point me to the file in which I can amend this? I found this snippet in
RT_Config.pm and basically I need to find the procedure is so I can alter it
to get the username instead.

Any help would be greatly appreciated.

=item C<$UsernameFormat>

This determines how user info is displayed. ‘concise’ will show one of
either NickName, RealName, Name or EmailAddress, depending on what exists
and whether the user is privileged or not. ‘verbose’ will show RealName and
EmailAddress.

=cut

Set($UsernameFormat, ‘concise’);


Regards,

Aaron

Hi Aaron,

We had the same problem here. It was a bit odd that the old format
is not one of the options. Here are the changes we made for 3.8.5
that will probably work in 3.8.6 as well:

cp RTHOME/share/html/Elements/ShowUser -> local/html/Element/ShowUser

Patch as follows:

— share/html/Elements/ShowUser 2009-10-13 12:24:43.000000000 -0500
+++ local/html/Elements/ShowUser 2009-10-27 10:13:58.000000000 -0500
@@ -60,6 +60,9 @@
if ( $style eq ‘concise’ ) {
$m->comp( ‘/Elements/ShowUserConcise’, User => $User );
}
+elsif ( $style eq ‘old’ ) {

  • $m->comp( ‘/Elements/ShowUserOld’, User => $User );
    +}
    else { $m->comp( ‘/Elements/ShowUserVerbose’, User => $User ); }
    </%INIT>
    <%ARGS>

and here is ShowUserOld:

<%INIT>
if ($User) {
my $printable;
if ( $User->EmailAddress && $User->EmailAddress ne $User->Name ) {
$printable = $User->Name . ’ <’ . $User->EmailAddress .’>’;
}
else {
$printable = $User->Name
|| $User->EmailAddress
|| $User->RealName
|| $User->NickName;
}
$m->out( $m->interp->apply_escapes( $printable, ‘h’ ) );
}

</%INIT>
<%ARGS>
$User => undef
$Address => undef
</%ARGS>

Thanks Ken,

I have patched the files as recommended, I will let you know how we get on.
Just waiting for the scheduled automatic restart of apache tonight.

Regards,*

*Aaron Guise

07 838 7793
027 212 6638
aaron@guise.net.nz

MSN: guisea@hotmail.com
Contact Me [image: Facebook] http://www.facebook.com/shadysandmanOn Tue, Dec 8, 2009 at 3:25 AM, Kenneth Marshall ktm@rice.edu wrote:

On Sun, Dec 06, 2009 at 11:12:56PM +1300, Aaron Guise wrote:

Hi,

Just updated to RT 3.8.6, all looks well but on rt 3.8.0 all users were
listed in select box and transaction history as username i.e aguise for
myself. RT 3.8.6 is displaying the full name (Aaron Guise) . Our users
are so used to the old format and they really want it back. Can someone
point me to the file in which I can amend this? I found this snippet in
RT_Config.pm and basically I need to find the procedure is so I can alter
it
to get the username instead.

Any help would be greatly appreciated.

=item C<$UsernameFormat>

This determines how user info is displayed. ‘concise’ will show one of
either NickName, RealName, Name or EmailAddress, depending on what exists
and whether the user is privileged or not. ‘verbose’ will show RealName
and
EmailAddress.

=cut

Set($UsernameFormat, ‘concise’);


Regards,

Aaron

Hi Aaron,

We had the same problem here. It was a bit odd that the old format
is not one of the options. Here are the changes we made for 3.8.5
that will probably work in 3.8.6 as well:

cp RTHOME/share/html/Elements/ShowUser -> local/html/Element/ShowUser

Patch as follows:

— share/html/Elements/ShowUser 2009-10-13 12:24:43.000000000 -0500
+++ local/html/Elements/ShowUser 2009-10-27 10:13:58.000000000 -0500
@@ -60,6 +60,9 @@
if ( $style eq ‘concise’ ) {
$m->comp( ‘/Elements/ShowUserConcise’, User => $User );
}
+elsif ( $style eq ‘old’ ) {

  • $m->comp( ‘/Elements/ShowUserOld’, User => $User );
    +}
    else { $m->comp( ‘/Elements/ShowUserVerbose’, User => $User ); }
    </%INIT>
    <%ARGS>

and here is ShowUserOld:


<%INIT>
if ($User) {
my $printable;
if ( $User->EmailAddress && $User->EmailAddress ne $User->Name ) {
$printable = $User->Name . ’ <’ . $User->EmailAddress .’>’;
}
else {
$printable = $User->Name
|| $User->EmailAddress
|| $User->RealName
|| $User->NickName;
}
$m->out( $m->interp->apply_escapes( $printable, ‘h’ ) );
}

</%INIT>
<%ARGS>
$User => undef
$Address => undef
</%ARGS>


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com