"Votes" text box should be checkbox

VERIFIED FIXED in Bugzilla 2.12

Status

()

Bugzilla
Bugzilla-General
P3
normal
VERIFIED FIXED
18 years ago
5 years ago

People

(Reporter: Gwyn Judd, Assigned: Stephan Niemz)

Tracking

unspecified
Bugzilla 2.12
Other
All

Details

(Whiteboard: 2.12)

Attachments

(3 attachments)

(Reporter)

Description

18 years ago
In the "My Votes" page, the "Votes" text box should be a checkbox, since after
the policy change you cannot vote more than once anyway

Comment 1

18 years ago
tara@tequilarista.org is the new owner of Bugzilla and Bonsai.  (For details,
see my posting in netscape.public.mozilla.webtools,
news://news.mozilla.org/38F5D90D.F40E8C1A%40geocast.com .)
Assignee: terry → tara

Comment 2

18 years ago
*** Bug 38134 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 3

18 years ago
    I think for other components such as webtools there is still more than one
vote allowed, so for those components an option menu would certainly be
appropriate. (At least I have just seen somebody giving five votes to a
bug.)

I would like to vote for this bug, but I can't. See bug 41519.
(Assignee)

Comment 4

18 years ago
I'm attaching a patch to showvotes.cgi which does the following:

- if the max number of allowed votes per bug is one, it offers a checkbox,
- if that number is less than ten, it offeres a selection,
- else the behaviour is unchanged (text input).

    Additionally products without any votes tabulated are now omitted since
I don't find them very interesting and without them you maybe don't have to
scroll to see everything. But that's just a one-line change, you can leave
it out if you don't like it.

    Unfortunately I can't test this since I don't have mySQL et al
installed.  So can somebody please review and test this patch (and
maybe even check it in)? Thanks!

    - Stephan.
Keywords: patch, review
(Assignee)

Comment 5

18 years ago
Created attachment 18656 [details]
proposed patch
(Assignee)

Comment 6

17 years ago
I attached a patch two months ago. What should I do to get this checked in?
Isn't this the appropriate place here?
I think a selection of numbers is a bit much.  I'd much prefer a textbox or a
checkbox.
I'm with Matt.  I think the select box is a bit much.  Post a new patch with just 
the checkbox and the text box if you can.
(Assignee)

Comment 9

17 years ago
Okay, I'll do that in the next few days.
Status: NEW → ASSIGNED
(Assignee)

Comment 10

17 years ago
Oops, I meant to reassign the bug to myself before accepting ...
Assignee: tara → st.n
Status: ASSIGNED → NEW
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 11

17 years ago
Created attachment 22901 [details] [diff] [review]
patch #2
(Assignee)

Comment 12

17 years ago
Attached is the modified patch without the selection. Now you get either a
checkbox or a text input.

Please review and test. Again, I can't test this because I don't have my own
Bugzilla installation, sorry.
(Assignee)

Comment 13

17 years ago
Maybe this could also make it for 2.12?
Whiteboard: 2.12

Comment 14

17 years ago
This patch causes globals.pl to barf when showvotes.cgi is invoked:

SELECT products.product, products.maxvotesperbug FROM products: Table 'products'
was not locked with LOCK TABLES at globals.pl line 171

I'll try to dig into this a bit later, but if you could have a look at it it
would more likely make the 2.12 cut.
(Assignee)

Comment 15

17 years ago
Created attachment 22971 [details] [diff] [review]
patch #3
(Assignee)

Comment 16

17 years ago
Okay, I didn't know I have to lock a table before trying to read from it.
Now I changed  SendSQL("lock tables bugs read, votes write");
to             SendSQL("lock tables bugs read, products read, votes write");
which should fix this.

Please test again. Thanks!

Comment 17

17 years ago
I now have patched my personal copy of BugZilla 2.11 (cvs pull from yesterday)
with this patch, and it's working quite well.
I think this is the right way to do this, looks nice!
r= dave@intrec.com

installed on my test system, works as advertised.
checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 20

17 years ago
I look forward to seeing it in action here.
*** Bug 69754 has been marked as a duplicate of this bug. ***

Comment 22

17 years ago
Sorry for the spam, but I needed to be able to query for all of these correctly.
Target Milestone: --- → Bugzilla 2.12
Can't verify, as no "One vote only" components on landfill. Either that, or this 
doesn't work. :-)

Gerv
Verified, this is present on the Mozilla products on mozilla.org.
Status: RESOLVED → VERIFIED
Moving closed bugs to Bugzilla product
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
Version: other → unspecified
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.