Closed
Bug 26074
Opened 25 years ago
Closed 14 years ago
Ability to limit search by number of Comments
Categories
(Bugzilla :: Query/Bug List, enhancement, P3)
Bugzilla
Query/Bug List
Tracking
()
RESOLVED
FIXED
Bugzilla 4.2
People
(Reporter: sidr, Assigned: mkanat)
References
Details
Attachments
(1 file, 3 obsolete files)
13.16 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
Requested: a way to limit searches to just those bug reports to which no additional comments have been made since they were reported. The bugs that most need attention on the "Browser-General" list are those that have been in the database for some time but nobody has added any comments to yet. Among the bugs one or more weeks old, most have had some comment added, so at present there is no good way to zero in on these bugs. Now that boolean charts have been added, it would always be possible to AND a search with the bugs that do not contain the string "-- Additional Comments From", but that would be brutally expensive. Since it probably isn't going to ever be necessary to know the number of comments added, this would amount to adding a boolean field, set to 0 when a bug is created, and set to 1 when a comment is added. Enabling this would allow both those prescreening older "Browser-General" bugs and those prescreening recent bugs across all components to concentrate on those not already touched, reducing duplication of effort.
Comment 1•25 years ago
|
||
> Now that boolean charts have been added, it would always be possible to
> AND a search with the bugs that do not contain the string
> "-- Additional Comments From", but that would be brutally expensive.
Actually, that won't work. (It would have at one time, but no longer!) That
string is not actually in the database; it is created by the web pages on the
fly.
Determining the number of comments is now easy. I could add an entry in the
boolean chart that read "number of comments on the bug", and you could query for
that being <= 1. (The initial description counts as a comment, as far as the
underlying DB is concerned.)
Note that there are also ways of querying for "bugs that haven't been touched
for a week".
Status: NEW → ASSIGNED
Priority: P3 → P2
Reporter | ||
Comment 2•25 years ago
|
||
Your proposed fix sounds great, and would definitely handle the case of "bugs that haven't been commented upon ever". I don't suppose the reporter's original comment ("Description" on enter_bug.cgi) could be number 0 instead of number 1? Looking at a show_bug.cgi page, the reporter's original comments are under "Description", but the rest of the comments are under an "------- Additional Comments From" line, which gives the prima facie appearance that they are in a different category, especially since the reporter's comment was labelled "Description" on enter_bug.cgi too. And I know you wouldn't want to change Description to Comments in both of those cgi scripts for consistency with the underlying data model ;-0 This would allow a more natural sounding query like "number of comments equal to zero". I'll understand if you don't want to do this, though.
Reporter | ||
Comment 3•25 years ago
|
||
Reading bug 21080, "Need query for activity on bugs", FIXED by the boolean charts, I was about to say that this bug report is almost superfluous, but since Jan Leger took all of the bugs assigned to "nobody@mozilla.org" today there are no bugs on the "Browser-General" list that would show as inactive for more than a day now. This type of search would still be useful for the task of finding bugs with no comments, the number would just have to be upped by one to adjust for the new comment explaining the change of ownership on all those bugs, while the "bugs that haven't been touched for a week" query would now fail utterly.
Summary: [RFE] Ability to limit search: bugs without Additional Comments → [RFE] Ability to limit search by number of Comments
Comment 4•25 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
Status: ASSIGNED → NEW
Updated•24 years ago
|
Status: NEW → ASSIGNED
Priority: P2 → P3
Updated•24 years ago
|
QA Contact: matty
Whiteboard: 3.2
Comment 5•24 years ago
|
||
moving to real milestones...
Whiteboard: 3.2
Target Milestone: --- → Bugzilla 3.2
Comment 6•23 years ago
|
||
-> Bugzilla product, Query component, reassigning.
Assignee: tara → endico
Status: ASSIGNED → NEW
Component: Bugzilla → Query/Bug List
Product: Webtools → Bugzilla
Version: other → unspecified
Updated•21 years ago
|
OS: Windows NT → All
Hardware: PC → All
Updated•21 years ago
|
Summary: [RFE] Ability to limit search by number of Comments → Ability to limit search by number of Comments
Updated•21 years ago
|
Assignee: endico → nobody
Updated•20 years ago
|
Assignee: nobody → LpSolit
Updated•20 years ago
|
Status: NEW → ASSIGNED
Comment 7•20 years ago
|
||
The request is very simple. For example: SELECT bug_id, count(*) FROM longdescs GROUP BY bug_id HAVING count(*)<2; gives all bugs having less than two comments. But implementing this in Bugzilla/Search.pm is by far less easy. Is someone familiar with this file?
Comment 8•20 years ago
|
||
It is now possible to search for a boolean chart like... Add a boolean chart for "Commenter" "is not equal to" "%reporter%" which would restrict a search to bugs where someone other than the reporter has commented. Does that impact the need for this feature?
Updated•20 years ago
|
Target Milestone: Bugzilla 3.2 → ---
Comment 9•19 years ago
|
||
I don't really care about this bug anymore... reassigning to default owner.
Assignee: LpSolit → query-and-buglist
Status: ASSIGNED → NEW
QA Contact: mattyt-bugzilla → default-qa
Assignee | ||
Comment 10•14 years ago
|
||
Here's a patch that adds comment counts to both search criteria and the buglist. However, it currently has really miserable performance, and I'm not quite sure how to get around that. We can't really use a HAVING clause in the main SQL, because that breaks boolean charts. The SQL I have in this patch is logically sound and does not break boolean charts, but it is miserably slow on a large installation (so slow that your searches will effectively never return).
Assignee: query-and-buglist → mkanat
Status: NEW → ASSIGNED
Comment 11•14 years ago
|
||
i'd be happy if it could special case detecting just 0 comments or no comments other than reporters in a performant manner.
Assignee | ||
Comment 12•14 years ago
|
||
(In reply to comment #11) > i'd be happy if it could special case detecting just 0 comments or no comments > other than reporters in a performant manner. Yeah, that'd be useful, but even if we do that I need some framework to make it clear that certain types of searches can only be done under certain circumstances, or we technically are just adding more bugs to the search interface (and believe me, it doesn't need any more of those).
Assignee | ||
Comment 13•14 years ago
|
||
Okay, I found something that may work. This SQL returns very quickly: SELECT totals.bug_id FROM (SELECT bug_id, COUNT(*) AS comment_count FROM longdescs GROUP BY bug_id) AS totals WHERE totals.comment_count > 100 So either we can put that into a view or we can use it as a table in the query.
Assignee | ||
Comment 14•14 years ago
|
||
Okay, that SQL seems to work pretty nicely! A lot of this patch involves updating the xt/search.t tests to also test the longdescs.count field, which is our first count field. This is breaking the percentage_complete xt/search.t tests, though, and I think that it has something more to do with the tests than with the actual functionality (although I do believe it is exposing a bug with percentage_complete...which is totally unsurprising).
Attachment #458160 -
Attachment is obsolete: true
Attachment #480833 -
Flags: review+
Assignee | ||
Updated•14 years ago
|
Target Milestone: --- → Bugzilla 4.2
Assignee | ||
Updated•14 years ago
|
Attachment #480833 -
Flags: review+
Assignee | ||
Comment 15•14 years ago
|
||
Okay, upon testing, this is still relatively slow on my local copy of the bmo dataset, but not so slow that it will never return. (Also, my local copy of the bmo dataset is generally slow because my machine's hardware is not as nice as bmo's.) I'm not aware of any way that this could get faster, other than us deciding to start caching comment counts in the bugs table, and I don't want to start adding database-side caches back to Bugzilla. This patch fixes an error with the isprivate stuff in the last patch.
Attachment #480833 -
Attachment is obsolete: true
Attachment #480835 -
Flags: review+
Assignee | ||
Comment 16•14 years ago
|
||
Here we go! This one now fully passes all of the xt/search.t tests. (Mostly the difference between this one and v2 is just fixes for the tests.)
Attachment #480835 -
Attachment is obsolete: true
Attachment #480870 -
Flags: review+
Assignee | ||
Comment 17•14 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified Bugzilla/Comment.pm modified Bugzilla/Field.pm modified Bugzilla/Search.pm modified template/en/default/global/field-descs.none.tmpl modified template/en/default/list/table.html.tmpl modified xt/lib/Bugzilla/Test/Search.pm modified xt/lib/Bugzilla/Test/Search/Constants.pm modified xt/lib/Bugzilla/Test/Search/FieldTest.pm modified xt/lib/Bugzilla/Test/Search/InjectionTest.pm Committed revision 7521.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•