Re: [rt-users] Help reverting RT 3.8.6 back to displaying username instead of RealName

2009-12-07 Thread Aaron Guise
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
aa...@guise.net.nz
 *


MSN: gui...@hotmail.com
Contact Me [image: Facebook] 


On Tue, Dec 8, 2009 at 3:25 AM, Kenneth Marshall  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/ShowUser2009-10-13 12:24:43.0 -0500
> +++ local/html/Elements/ShowUser2009-10-27 10:13:58.0 -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 ); }
>  
>  <%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' ) );
> }
>
> 
> <%ARGS>
> $User => undef
> $Address => undef
> 
> 
> > ___
> > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> >
> > Community help: http://wiki.bestpractical.com
> > Commercial support: sa...@bestpractical.com
> >
> >
> > Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> > Buy a copy at http://rtbook.bestpractical.com
>
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

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


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

Re: [rt-users] Help reverting RT 3.8.6 back to displaying username instead of RealName

2009-12-07 Thread Kenneth Marshall
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/ShowUser2009-10-13 12:24:43.0 -0500
+++ local/html/Elements/ShowUser2009-10-27 10:13:58.0 -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 ); }
 
 <%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' ) );
}


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


> ___
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Community help: http://wiki.bestpractical.com
> Commercial support: sa...@bestpractical.com
> 
> 
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

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


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


[rt-users] Help reverting RT 3.8.6 back to displaying username instead of RealName

2009-12-06 Thread Aaron Guise
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
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

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


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