Closed Bug 103803 Opened 24 years ago Closed 6 years ago

Bugzilla allows users to search votes for things that aren't numbers

Categories

(Bugzilla :: Extensions, defect, P3)

2.15

Tracking

()

RESOLVED WONTFIX

People

(Reporter: asa, Unassigned)

References

()

Details

Attachments

(1 file)

in the boolean chart: Votes | Changed by | asa@mozilla.org does not give me the list of bugs where I added a vote. It returns zero results even though I have voted for many bugs. here's the SQL: SELECT bugs.bug_id, bugs.groupset, substring(bugs.bug_severity, 1, 3), substring(bugs.priority, 1, 3), map_assigned_to.login_name, substring(bugs.bug_status,1,4), substring(bugs.component, 1, 8), bugs.short_desc FROM bugs, profiles map_assigned_to, profiles map_reporter LEFT JOIN profiles map_qa_contact ON bugs.qa_contact = map_qa_contact.userid, bugs_activity act_0, fielddefs fielddefs_0 WHERE bugs.assigned_to = map_assigned_to.userid AND bugs.reporter = map_reporter.userid AND bugs.groupset & 3583 = bugs.groupset AND act_0.bug_id = bugs.bug_id AND act_0.fieldid = fielddefs_0.fieldid AND ((fielddefs_0.name = 'votes' AND act_0.who = 5003)) GROUP BY bugs.bug_id ORDER BY bugs.bug_id
Hmm. Vote changed aren't stored. This should say the option combination is invalid.
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.18
I get the same behaviour for the boolean chart: Votes | contains (case-sensitive) substring I get the impression that searching by votes doesn't work at all.
Assignee: endico → nobody
nobody@bugzilla.org cares about these poor bugs and they haven't been touched in nearly 2 months. No way they'll hit 2.18 unless something changes. --> 2.20 If someone adopts them, they can pull them back in.
Target Milestone: Bugzilla 2.18 → Bugzilla 2.20
Votes | is equal to | mkanat@kerio.com That created a query SO LONG that b.m.o. today (2.19.1+) didn't return it to me within 60 seconds.
I think it would be nice for somebody to look at this before we release 2.20. It's probably something simple, like a missing index.
Assignee: nobody → mkanat
Severity: minor → normal
Summary: cannot query for votes changed by user → Boolean Chart searches on votes are very slow
Here's the current SQL that searching for "votes changed by" produces, and the EXPLAIN output for the query.
I think the real problem is that the "votes" column only stores a current count of the votes, and not who the "voter" is. So when we try to search on a string, weird things happen. I'm not sure why it times out, but I know that when I put a number in the "votes" "is equal to" field, it comes back very quickly.
Severity: normal → minor
Summary: Boolean Chart searches on votes are very slow → Bugzilla allows users to search votes for things that aren't numbers
Only security and dataloss fixes will be accepted on the 2.20 branch. Retargetting to 2.22.
QA Contact: mattyt-bugzilla → default-qa
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22
Target Milestone: Bugzilla 2.22 → Bugzilla 3.2
https://bugzilla.mozilla.org/buglist.cgi?&product=Derivatives&field0-0-0=votes&type0-0-0=equals&value0-0-0=mkanat%40kerio.com&debug=1 Mon Aug 6 2007 01:42:57 PDT 0-0 = product | anyexact | Derivatives * ^product,(?!changed) (product / anyexact / Derivatives) => products.name / anyexact / Derivatives / bugs.product_id IN (12) * ,equals (votes / equals / mkanat@kerio.com) => votes / equals / mkanat@kerio.com / bugs.votes = 'mkanat@kerio.com' * SELECT bugs.bug_id, bugs.bug_severity, bugs.priority, bugs.bug_status, bugs.resolution, map_products.name, bugs.bug_severity, bugs.priority, bugs.op_sys, map_assigned_to.login_name, bugs.bug_status, bugs.resolution, bugs.short_desc FROM bugs INNER JOIN profiles AS map_assigned_to ON (bugs.assigned_to = map_assigned_to.userid) INNER JOIN products AS map_products ON (bugs.product_id = map_products.id) LEFT JOIN priority ON (priority.value = bugs.priority) LEFT JOIN bug_severity ON (bug_severity.value = bugs.bug_severity) LEFT JOIN bug_group_map ON bug_group_map.bug_id = bugs.bug_id AND bug_group_map.group_id NOT IN (23,19,4,9,20,2,12,18,7,10) LEFT JOIN cc ON cc.bug_id = bugs.bug_id AND cc.who = 15223 WHERE ((bugs.product_id IN (12))) AND ((bugs.votes = 'mkanat@kerio.com')) AND bugs.creation_ts IS NOT NULL AND ((bug_group_map.group_id IS NULL) OR (bugs.reporter_accessible = 1 AND bugs.reporter = 15223) OR (bugs.cclist_accessible = 1 AND cc.who IS NOT NULL) OR (bugs.assigned_to = 15223) OR (bugs.qa_contact = 15223) ) GROUP BY bugs.bug_id ORDER BY priority.sortkey,priority.value,bug_severity.sortkey,bug_severity.value What did people do to cause accidents before cell phones? 28 bugs found. https://bugzilla.mozilla.org/buglist.cgi?&product=Derivatives&field0-0-0=bug_id&type0-0-0=equals&value0-0-0=mkanat%40kerio.com&debug=1 Mon Aug 6 2007 01:42:28 PDT 0-0 = product | anyexact | Derivatives * ^product,(?!changed) (product / anyexact / Derivatives) => products.name / anyexact / Derivatives / bugs.product_id IN (12) * ,equals (bug_id / equals / mkanat@kerio.com) => bug_id / equals / mkanat@kerio.com / bugs.bug_id = 'mkanat@kerio.com' * SELECT bugs.bug_id, bugs.bug_severity, bugs.priority, bugs.bug_status, bugs.resolution, map_products.name, bugs.bug_severity, bugs.priority, bugs.op_sys, map_assigned_to.login_name, bugs.bug_status, bugs.resolution, bugs.short_desc FROM bugs INNER JOIN profiles AS map_assigned_to ON (bugs.assigned_to = map_assigned_to.userid) INNER JOIN products AS map_products ON (bugs.product_id = map_products.id) LEFT JOIN priority ON (priority.value = bugs.priority) LEFT JOIN bug_severity ON (bug_severity.value = bugs.bug_severity) LEFT JOIN bug_group_map ON bug_group_map.bug_id = bugs.bug_id AND bug_group_map.group_id NOT IN (23,19,4,9,20,2,12,18,7,10) LEFT JOIN cc ON cc.bug_id = bugs.bug_id AND cc.who = 15223 WHERE ((bugs.product_id IN (12))) AND ((bugs.bug_id = 'mkanat@kerio.com')) AND bugs.creation_ts IS NOT NULL AND ((bug_group_map.group_id IS NULL) OR (bugs.reporter_accessible = 1 AND bugs.reporter = 15223) OR (bugs.cclist_accessible = 1 AND cc.who IS NOT NULL) OR (bugs.assigned_to = 15223) OR (bugs.qa_contact = 15223) ) GROUP BY bugs.bug_id ORDER BY priority.sortkey,priority.value,bug_severity.sortkey,bug_severity.value "To start press any key" -Where is the any-key? Zarro Boogs found. I don't understand why votes is less special than bug_id. clearly some fields are more equal than others. (My guess is that all the joins are relevant, but ....) It's of course trivial for me to write an IsNumeric or add some testing for the votes field to exclude things that don't make sense. Is votes really the only special field? https://bugzilla.mozilla.org/buglist.cgi?&product=Derivatives&field0-0-0=dependson&type0-0-0=equals&value0-0-0=mkanat%40kerio.com&debug=1 ^product,(?!changed) (product / anyexact / Derivatives) => products.name / anyexact / Derivatives / bugs.product_id IN (12) * ^dependson,(?!changed) (dependson / equals / mkanat@kerio.com) => dependson / equals / mkanat@kerio.com / dependson_0.dependson IS NOT NULL * SELECT bugs.bug_id, bugs.bug_severity, bugs.priority, bugs.bug_status, bugs.resolution, map_products.name, bugs.bug_severity, bugs.priority, bugs.op_sys, map_assigned_to.login_name, bugs.bug_status, bugs.resolution, bugs.short_desc FROM bugs INNER JOIN profiles AS map_assigned_to ON (bugs.assigned_to = map_assigned_to.userid) INNER JOIN products AS map_products ON (bugs.product_id = map_products.id) LEFT JOIN dependencies AS dependson_0 ON (dependson_0.blocked = bugs.bug_id AND (dependson_0.dependson = 'mkanat@kerio.com')) LEFT JOIN priority ON (priority.value = bugs.priority) LEFT JOIN bug_severity ON (bug_severity.value = bugs.bug_severity) LEFT JOIN bug_group_map ON bug_group_map.bug_id = bugs.bug_id AND bug_group_map.group_id NOT IN (23,19,4,9,20,2,12,18,7,10) LEFT JOIN cc ON cc.bug_id = bugs.bug_id AND cc.who = 15223 WHERE ((bugs.product_id IN (12))) AND ((dependson_0.dependson IS NOT NULL)) AND bugs.creation_ts IS NOT NULL AND ((bug_group_map.group_id IS NULL) OR (bugs.reporter_accessible = 1 AND bugs.reporter = 15223) OR (bugs.cclist_accessible = 1 AND cc.who IS NOT NULL) OR (bugs.assigned_to = 15223) OR (bugs.qa_contact = 15223) ) GROUP BY bugs.bug_id ORDER BY priority.sortkey,priority.value,bug_severity.sortkey,bug_severity.value Your favorite bug has been identified, multiplied and added to the latest option pack. cheers. Zarro Boogs found.
Bugzilla 3.2 is restricted to security bugs only. Mass-retargetting to 3.6.
Target Milestone: Bugzilla 3.2 → Bugzilla 3.6
Assignee: mkanat → query-and-buglist
Bugzilla 3.6 is now restricted to security fixes only, and this bug got no traction for several months. We will retarget this bug once it has a patch ready for checkin.
Target Milestone: Bugzilla 3.6 → ---
Assignee: query-and-buglist → extensions
Component: Query/Bug List → Extensions

The voting functionality will be replaced with emoji comment reactions in the near future.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: