Last Comment Bug 385910 - Add parameter to allow "find a specific bug" to accept an empty search
: Add parameter to allow "find a specific bug" to accept an empty search
Status: VERIFIED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: Query/Bug List (show other bugs)
: 3.0
: All All
: -- enhancement (vote)
: Bugzilla 3.0
Assigned To: Brad Johnson
: default-qa
Mentors:
: 383640 441527 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-26 07:44 PDT by Brad Johnson
Modified: 2008-06-25 01:42 PDT (History)
6 users (show)
mkanat: approval+
mkanat: approval3.0+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch that adds parameter for enabling/disabling empty word quicksearches (3.51 KB, patch)
2007-06-26 09:12 PDT, Brad Johnson
LpSolit: review+
Details | Diff | Review
Rename new configuration parameter to find_specific_allow_empty_words (2.96 KB, patch)
2007-07-02 12:44 PDT, Brad Johnson
no flags Details | Diff | Review
Rename new configuration parameter to specific_search_allow_empty_words (2.97 KB, patch)
2007-07-02 14:57 PDT, Brad Johnson
wicked: review+
Details | Diff | Review

Description Brad Johnson 2007-06-26 07:44:09 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070508 Iceweasel/2.0.0.4 (Debian-2.0.0.4-0etch1)
Build Identifier: 3.0

Bug# 234226 Added javascript and server side validation of the "words" field that prevents it from being empty. On a Bugzilla install with many small projects it is desirable to search for all open bugs easily through this form.

We should add an admin parameter to turn on and off the validation implemented in bug #234226.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Brad Johnson 2007-06-26 09:12:16 PDT
Created attachment 269869 [details] [diff] [review]
Patch that adds parameter for enabling/disabling empty word quicksearches
Comment 2 Frédéric Buclin 2007-06-26 10:41:40 PDT
Bah, there was already a bug filed about this, see bug 383640. Next time, do a (non-empty) search first. ;)
Comment 3 Frédéric Buclin 2007-06-26 10:42:56 PDT
*** Bug 383640 has been marked as a duplicate of this bug. ***
Comment 4 Frédéric Buclin 2007-06-26 11:29:58 PDT
Comment on attachment 269869 [details] [diff] [review]
Patch that adds parameter for enabling/disabling empty word quicksearches

>Index: buglist.cgi

>+if (!Bugzilla->params->{'quicksearch_allow_empty_words'} && defined($cgi->param('content')) && $cgi->param('content') =~ /^\s*$/) {

This line is too long, but it can be split on checkin (I will do it). Thanks for the patch! r=LpSolit
Comment 5 Frédéric Buclin 2007-06-26 11:31:06 PDT
We had enough complain about this "bug" to take it for 3.0.1. This patch is safe.
Comment 6 Frédéric Buclin 2007-06-26 11:39:05 PDT
tip:

Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v  <--  buglist.cgi
new revision: 1.357; previous revision: 1.356
done
Checking in Bugzilla/Config/Query.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config/Query.pm,v  <--  Query.pm
new revision: 1.4; previous revision: 1.3
done
Checking in template/en/default/admin/params/query.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/params/query.html.tmpl,v  <--  query.html.tmpl
new revision: 1.2; previous revision: 1.1
done
Checking in template/en/default/search/search-specific.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/search/search-specific.html.tmpl,v  <--  search-specific.html.tmpl
new revision: 1.22; previous revision: 1.21
done


3.0:

Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v  <--  buglist.cgi
new revision: 1.351.2.2; previous revision: 1.351.2.1
done
Checking in Bugzilla/Config/Query.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config/Query.pm,v  <--  Query.pm
new revision: 1.3.4.1; previous revision: 1.3
done
Checking in template/en/default/admin/params/query.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/params/query.html.tmpl,v  <--  query.html.tmpl
new revision: 1.1.4.1; previous revision: 1.1
done
Checking in template/en/default/search/search-specific.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/search/search-specific.html.tmpl,v  <--  search-specific.html.tmpl
new revision: 1.20.2.2; previous revision: 1.20.2.1
done
Comment 7 Teemu Mannermaa (:wicked) 2007-06-27 03:54:22 PDT
Comment on attachment 269869 [details] [diff] [review]
Patch that adds parameter for enabling/disabling empty word quicksearches

>Index: template/en/default/admin/params/query.html.tmpl
>===================================================================
>+  quicksearch_allow_empty_words => "Whether to allow a QuickSearch with empty Words." }

Nit: Actually this name is misleading as this is not about QuickSearch functionality but rather only about the Simple/Specific Search.
Comment 8 Max Kanat-Alexander 2007-06-27 22:10:59 PDT
(In reply to comment #7)
> Nit: Actually this name is misleading as this is not about QuickSearch
> functionality but rather only about the Simple/Specific Search.

  Agreed.
Comment 9 Brad Johnson 2007-07-02 12:44:29 PDT
Created attachment 270618 [details] [diff] [review]
Rename new configuration parameter to find_specific_allow_empty_words

Rename new configuration parameter from quicksearch_allow_empty_words to find_specific_allow_empty_words. This patch is made against BUGZILLA-3_0-BRANCH.
Comment 10 Frédéric Buclin 2007-07-02 13:20:15 PDT
I'm fine with this change (or even specific_search_allow_empty_words). Max, Teemu, are you OK with the new param name suggested by Brad?
Comment 11 Max Kanat-Alexander 2007-07-02 14:07:41 PDT
(In reply to comment #10)
> I'm fine with this change (or even specific_search_allow_empty_words). Max,
> Teemu, are you OK with the new param name suggested by Brad?

  I like your specific_search one.
Comment 12 Brad Johnson 2007-07-02 14:55:15 PDT
I like specific_search_allow_empty_words too.
Comment 13 Brad Johnson 2007-07-02 14:57:21 PDT
Created attachment 270627 [details] [diff] [review]
 Rename new configuration parameter to specific_search_allow_empty_words  

Rename new configuration parameter to specific_search_allow_empty_words instead of find_specific_allow_empty_words. This patch is made against BUGZILLA-3_0-BRANCH.
Comment 14 Teemu Mannermaa (:wicked) 2007-07-03 02:21:56 PDT
Comment on attachment 270627 [details] [diff] [review]
 Rename new configuration parameter to specific_search_allow_empty_words  

>Index: template/en/default/admin/params/query.html.tmpl
>===================================================================
>+  				"Bug page with empty Words." }

This line has tabs which must be removed before commit or trees will burn.

Nit: Adding "field" after Words might make it more clear what this description is talking about.

Otherwise looks fine to me and the name is much better.
Comment 15 Teemu Mannermaa (:wicked) 2007-07-03 02:23:20 PDT
There's more patches to commit.
Comment 16 Max Kanat-Alexander 2007-07-03 03:15:06 PDT
an empty "Words" field

Would be the best wording, I think.

Comment 17 Frédéric Buclin 2007-07-03 09:24:25 PDT
I changed the sentence as per comment 16. I also removed tabs.

tip:

Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v  <--  buglist.cgi
new revision: 1.358; previous revision: 1.357
done
Checking in Bugzilla/Config/Query.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config/Query.pm,v  <--  Query.pm
new revision: 1.5; previous revision: 1.4
done
Checking in template/en/default/admin/params/query.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/params/query.html.tmpl,v  <--  query.html.tmpl
new revision: 1.3; previous revision: 1.2
done
Checking in template/en/default/search/search-specific.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/search/search-specific.html.tmpl,v  <--  search-specific.html.tmpl
new revision: 1.23; previous revision: 1.22
done


3.0:

Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v  <--  buglist.cgi
new revision: 1.351.2.3; previous revision: 1.351.2.2
done
Checking in Bugzilla/Config/Query.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config/Query.pm,v  <--  Query.pm
new revision: 1.3.4.2; previous revision: 1.3.4.1
done
Checking in template/en/default/admin/params/query.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/params/query.html.tmpl,v  <--  query.html.tmpl
new revision: 1.1.4.2; previous revision: 1.1.4.1
done
Checking in template/en/default/search/search-specific.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/search/search-specific.html.tmpl,v  <--  search-specific.html.tmpl
new revision: 1.20.2.3; previous revision: 1.20.2.2
done
Comment 18 Denys Yurchenko 2007-09-11 00:34:03 PDT
Hi, 

I installed the patch and .... any changes!!!
I still get the warning!!!

P.S. Parameter specific_search_allow_empty_words is ON.
Comment 19 Frédéric Buclin 2008-01-04 06:21:21 PST
Has been relnoted in 3.0.1.
Comment 20 Frédéric Buclin 2008-06-25 01:42:40 PDT
*** Bug 441527 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.