Closed
Bug 803058
Opened 12 years ago
Closed 12 years ago
add a shortcut to quicksearch to enable or disable comment searching for that query
Categories
(bugzilla.mozilla.org :: General, enhancement)
Tracking
()
RESOLVED
FIXED
People
(Reporter: glob, Assigned: glob)
References
Details
Attachments
(1 file)
(deleted),
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
add a shortcut to quicksearch to disable comment searching for that query.
currently comment searching with quicksearch is only controlled via a preference; there's no shortcut to enable it on a query-by-query basis (which is useful for systems which use an API to interface with bugzilla).
we should make it so the fulltext searching can be explicitly enabled or disabled, perhaps with something like "--comments" to disable, and "++comments" to enable.
Comment 1•12 years ago
|
||
Isn't QS magic enough already? If users don't want comments to be included, then they should be a bit more explicit about which fields to look at.
(In reply to Frédéric Buclin from comment #1)
> Isn't QS magic enough already?
i don't think there's magic involved -- it's documented goodness ;)
> If users don't want comments to be included, then they should be a bit more explicit
> about which fields to look at.
you can't currently say "use the default query set, excluding comments", nor can you control the preference if you're running queries without authenticating.
Attachment #672773 -
Flags: review?(dkl)
Comment 4•12 years ago
|
||
Comment on attachment 672773 [details] [diff] [review]
patch v1
Review of attachment 672773 [details] [diff] [review]:
-----------------------------------------------------------------
::: Bugzilla/Search/Quicksearch.pm
@@ +177,5 @@
> }
> unshift(@words, "-$word");
> }
> + # --comment and ++comment disable or enable fulltext searching
> + elsif ($word =~ /^(--|\+\+)$comment$/io) {
Nit: Should allow for --comment or --comments IMO.
elsif ($word =~ /^(--|\+\+)$comments?$/io) {
My only gripe (and I know it is difficult to fix now) is that we are using the word 'comment' hard coded even though in the quicksearch docs you are using field_descs.longdesc so if someone were to change that value in the template the docs would no longer sync with reality.
Anyway, r=dkl since it works as expected.
Attachment #672773 -
Flags: review?(dkl) → review+
Comment 5•12 years ago
|
||
As said on IRC, I don't think it's a good idea to take upstream. Also, the localized string for "comment" is clearly a r- from me (already mentioned on IRC).
Component: Query/Bug List → General
Product: Bugzilla → bugzilla.mozilla.org
QA Contact: default-qa
Version: unspecified → Production
(In reply to David Lawrence [:dkl] from comment #4)
> My only gripe (and I know it is difficult to fix now) is that we are using
> the word 'comment' hard coded even though in the quicksearch docs you are
> using field_descs.longdesc
'comment' isn't hardcoded, the regex is using the value from field_decs.longdesc.
but, as per frédéric's comment, this is an overkill for a bmo only bug, and it means we can't support "comment" or "comments".
i'll commit a revision with comment/comments hard coded.
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.0/
modified Bugzilla/Search/Quicksearch.pm
modified template/en/default/pages/quicksearch.html.tmpl
Committed revision 8362.
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/
modified Bugzilla/Search/Quicksearch.pm
modified template/en/default/pages/quicksearch.html.tmpl
Committed revision 8387.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•