Displaying login_name from profiles for new columns

Thorsten Schöning tschoening at am-soft.de
Tue Aug 31 18:05:09 UTC 2021


Guten Tag Williams, Ruth,
am Dienstag, 31. August 2021 um 16:44 schrieben Sie:

> This would be similar to how the Assigner and Reporter are
> displayed.   Would you be able to direct me to the code that allows
> Assigner and Reporter to display login_name?

Have a look at the template "change-columns.html.tmpl" and variables
like "assigned_to_realname", search for those and find some mapping
about those fields to some search function "_user_nonchanged":

> C:\Program Files\Apache\httpd\htdocs\bugzilla\Bugzilla\Search.pm:
>   235    'attachments.submitter' => {_non_changed => \&_user_nonchanged,},
>   236    assigned_to             => {_non_changed => \&_user_nonchanged,},
>   237:   assigned_to_realname    => {_non_changed => \&_user_nonchanged,},
>   238    cc                      => {_non_changed => \&_user_nonchanged,},
>   239    commenter               => {_non_changed => \&_user_nonchanged,},

Have a look at that function, looks to me like there some magic based
on naming schemes, registered constants etc. is going on:

>   elsif (substr($field, -9) eq '_realname') {
>     my $as = "name_${field}_$chart_id";
>
>     # For fields with periods in their name.
>     $as =~ s/\./_/;
>     my $join = {
>       table => 'profiles',
>       as    => $as,
>       from  => substr($args->{full_field}, 0, -9),
>       to    => 'userid',
>       join  => (!$is_in_other_table and !$is_nullable) ? 'INNER' : undef,
>     };
>     push(@$joins, $join);
>     $args->{full_field} = "$as.realname";
>   }

But of course I don't know if that's the right direction at all. :-)

Mit freundlichen Grüßen

Thorsten Schöning

-- 
AM-SoFT IT-Service - Bitstore Hameln GmbH
Mitglied der Bitstore Gruppe - Ihr Full-Service-Dienstleister für IT und TK

E-Mail: Thorsten.Schoening at AM-SoFT.de
Web:    http://www.AM-SoFT.de/

Tel:   05151-  9468- 0
Tel:   05151-  9468-55
Fax:   05151-  9468-88
Mobil:  0178-8 9468-04

AM-SoFT IT-Service - Bitstore Hameln GmbH, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 221853 - Geschäftsführer: Janine Galonska






More information about the support-list mailing list