knob template: scroll down list of users

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

knob template: scroll down list of users

Martin d'Anjou
Hi,

Please tell me if I understand this right. I want the "Reassign bug to"
knob to be a pull down menu of all the login_names (or real names) instead
of a text box. The way I figured out to do this is the following:

1) modify process_bug.cgi and add the list of names to $vars
   e.g. get a list of users from the database and
   $vars->{'users'} = \@users

2) modify the knob.html.tmpl file and build the HTML menu with a
   [% FOREACH u = users %] loop.

Am I on the right track here? Other suggestions are welcome as well.

Regards,
Martin

-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists@...>
Reply | Threaded
Open this post in threaded view
|

Re: knob template: scroll down list of users

Colin Ogilvie
Martin d'Anjou wrote:

>Hi,
>
>Please tell me if I understand this right. I want the "Reassign bug to"
>knob to be a pull down menu of all the login_names (or real names) instead
>of a text box. The way I figured out to do this is the following:
>
>1) modify process_bug.cgi and add the list of names to $vars
>   e.g. get a list of users from the database and
>   $vars->{'users'} = \@users
>
>2) modify the knob.html.tmpl file and build the HTML menu with a
>   [% FOREACH u = users %] loop.
>
>Am I on the right track here? Other suggestions are welcome as well.
>
In the current CVS tip version, which will become 2.20, there is a
"usemenuforusers" paramater which will change this for you. You can see
details in https://bugzilla.mozilla.org/show_bug.cgi?id=251669 which is
the bug for implementing it.

Colin

-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists@...>
Reply | Threaded
Open this post in threaded view
|

Re: knob template: scroll down list of users

Gregary Hendricks
On Friday 10 June 2005 10:16, Colin Ogilvie wrote:

> Martin d'Anjou wrote:
> >Hi,
> >
> >Please tell me if I understand this right. I want the "Reassign bug to"
> >knob to be a pull down menu of all the login_names (or real names) instead
> >of a text box. The way I figured out to do this is the following:
> >
> >1) modify process_bug.cgi and add the list of names to $vars
> >   e.g. get a list of users from the database and
> >   $vars->{'users'} = \@users
> >
> >2) modify the knob.html.tmpl file and build the HTML menu with a
> >   [% FOREACH u = users %] loop.
> >
> >Am I on the right track here? Other suggestions are welcome as well.
>
> In the current CVS tip version, which will become 2.20, there is a
> "usemenuforusers" paramater which will change this for you. You can see
> details in https://bugzilla.mozilla.org/show_bug.cgi?id=251669 which is
> the bug for implementing it.
>
> Colin
>
Just as a note of interest, we tried implementing this a while back and
quickly decided it was not a good idea for a couple reasons:
1) you have a huge list of email addresses in one place. Huge bait for
spambots.
2) if you have a large number of users then you have to download the entire
user list for every bug you view. In our case it was a significant slow down
on the page.

Just my US$0.02

We implemented a user lookup that is a popup search box that then queries the
database and enters the one you choose. Same idea in about as many clicks
without the overhead :)

-Greg-


> -
> To view or change your list settings, click here:
> <http://bugzilla.org/cgi-bin/mj_wwwusr?user=ghendricks@...>

--
Greg Hendricks
Novell IS&T Engineer
[hidden email]
Office: (801) 861-3481
www.novell.com
-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists@...>
Reply | Threaded
Open this post in threaded view
|

Re: knob template: scroll down list of users

Martin d'Anjou
In reply to this post by Colin Ogilvie
> In the current CVS tip version, which will become 2.20, there is a
> "usemenuforusers" paramater which will change this for you. You can see
> details in https://bugzilla.mozilla.org/show_bug.cgi?id=251669 which is
> the bug for implementing it.

I applied the patch and fixed the broken hunks by hand. However, I get and
execution error:

"Couldn't do defparams.pl: No such file or directory at Bugzilla/Config.pm
line 132"

Is there something else I need to do?

Thanks,
Martin

-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists@...>
Reply | Threaded
Open this post in threaded view
|

Re: knob template: scroll down list of users

Martin d'Anjou
On Fri, 10 Jun 2005, Martin d'Anjou wrote:

> > In the current CVS tip version, which will become 2.20, there is a
> > "usemenuforusers" paramater which will change this for you. You can see
> > details in https://bugzilla.mozilla.org/show_bug.cgi?id=251669 which is
> > the bug for implementing it.
>
> I applied the patch and fixed the broken hunks by hand. However, I get and
> execution error:
>
> "Couldn't do defparams.pl: No such file or directory at Bugzilla/Config.pm
> line 132"
>
> Is there something else I need to do?

Forget it. I just run ./checksetup.pl and it works. There is another
problem though. The CC: list does not accept multiple choices. Should I
log a bug against this?

Martin

-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists@...>
Reply | Threaded
Open this post in threaded view
|

usemenuforusers: multiple Cc proposal and code

Martin d'Anjou
Hi,

I have tried a minor change on my bugzilla installation to allow selection
of multiple users in Cc: fields when entering/editing bugs.

The multiple Cc involves simple a simple change to userselect.html.tmpl:

[% IF Param("usemenuforusers") %]
<select name="[% name FILTER html %]"
  [% IF multiple %] multiple
                    size="[% multiple_size FILTER html %]"
  [% END %]
  [% IF onchange %] onchange="[% onchange FILTER html %]" [% END %]
  [% IF accesskey %] accesskey="[% accesskey FILTER html %]" [% END %]
>
... no changes to rest of code in userselect.html.tmpl

Where ever userselect is used in the templates to create a Cc list, you
can add the following two lines to get a list where multiple users can be
picked:

multiple => 1
multiple_size => 5   or a value you like for your install

Should I post this to https://bugzilla.mozilla.org/show_bug.cgi?id=251669

Regards,
Martin

-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists@...>
Reply | Threaded
Open this post in threaded view
|

Re: knob template: scroll down list of users

Dave Williss
In reply to this post by Colin Ogilvie
I believe there's also a bug that I logged a while back that it would be
nice if you could specify a user group for each of the dropdowns and
it would only show users who are in that "group".  For example, I only
want programmers in the "assigned to" dropdown and only QA people
in the QA dropdown.

The group would have to be per-product because different products
may have different programmer/QA teams.


----- Original Message -----
From: "Colin Ogilvie" <[hidden email]>
To: <[hidden email]>
Sent: Friday, June 10, 2005 11:16 AM
Subject: Re: knob template: scroll down list of users


> Martin d'Anjou wrote:
>
>>Hi,
>>
>>Please tell me if I understand this right. I want the "Reassign bug to"
>>knob to be a pull down menu of all the login_names (or real names) instead
>>of a text box. The way I figured out to do this is the following:
>>
>>1) modify process_bug.cgi and add the list of names to $vars
>>   e.g. get a list of users from the database and
>>   $vars->{'users'} = \@users
>>
>>2) modify the knob.html.tmpl file and build the HTML menu with a
>>   [% FOREACH u = users %] loop.
>>
>>Am I on the right track here? Other suggestions are welcome as well.
>>
> In the current CVS tip version, which will become 2.20, there is a
> "usemenuforusers" paramater which will change this for you. You can see
> details in https://bugzilla.mozilla.org/show_bug.cgi?id=251669 which is
> the bug for implementing it.
>
> Colin
>
> -
> To view or change your list settings, click here:
> <http://bugzilla.org/cgi-bin/mj_wwwusr?user=dwilliss@...>

-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists@...>
Reply | Threaded
Open this post in threaded view
|

Re: knob template: scroll down list of users

John Beranek
In reply to this post by Martin d'Anjou
Martin d'Anjou wrote:

> On Fri, 10 Jun 2005, Martin d'Anjou wrote:
>
>
>>>In the current CVS tip version, which will become 2.20, there is a
>>>"usemenuforusers" paramater which will change this for you. You can see
>>>details in https://bugzilla.mozilla.org/show_bug.cgi?id=251669 which is
>>>the bug for implementing it.
>>
>>I applied the patch and fixed the broken hunks by hand. However, I get and
>>execution error:
>>
>>"Couldn't do defparams.pl: No such file or directory at Bugzilla/Config.pm
>>line 132"
>>
>>Is there something else I need to do?
>
>
> Forget it. I just run ./checksetup.pl and it works. There is another
> problem though. The CC: list does not accept multiple choices. Should I
> log a bug against this?

See https://bugzilla.mozilla.org/show_bug.cgi?id=255428

It's resolved with a patch I submitted.

John.

--
John Beranek                         To generalise is to be an idiot.
http://redux.org.uk/                                 -- William Blake
-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists@...>
Reply | Threaded
Open this post in threaded view
|

Re: usemenuforusers: multiple Cc proposal and code

Max Kanat-Alexander
In reply to this post by Martin d'Anjou
On Fri, 2005-06-10 at 15:48 -0400, Martin d'Anjou wrote:
> Should I post this to https://bugzilla.mozilla.org/show_bug.cgi?id=251669

        No, I believe you should post it to another bug on the subject of
selecting multiple CCs. I think we've already filed such a bug, but if
we haven't then feel free to file it yourself and attach the patch.

        -Max
--
http://www.everythingsolved.com/
Everything Solved: Experts at Bugzilla... and everything else, too.

-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists@...>
Reply | Threaded
Open this post in threaded view
|

Re: knob template: scroll down list of users

timeless
In reply to this post by Gregary Hendricks
Greg Hendricks wrote:
> Just as a note of interest, we tried implementing this a while back and
> quickly decided it was not a good idea for a couple reasons:
> 2) if you have a large number of users then you have to download the entire
> user list for every bug you view. In our case it was a significant slow down
> on the page.

forget huge list. my company has ~30 people, unfortunately most of them
have names that begin (some names are changed to similar English names
to simplify my example) with J (jim, john, josh), S (sam, scott, sharon)
and T (terry, tim, tom). As such, using autocomplete works a lot better
than the listbox (in fact there are usually ~5 people per letter and i
usually want the middle one). As the list grows beyond 30 things get
considerably worse, you get more collisions and you're always better
served by any form of completion or nicknaming. Browsers especially
mozilla tend to behave terribly with any form of a list like this.
-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists@...>