Closed
Bug 362436
Opened 18 years ago
Closed 17 years ago
Allow to search for '---' in versions and milestones
Categories
(Bugzilla :: Query/Bug List, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.0
People
(Reporter: prasad.online, Assigned: michael.j.tosh)
References
Details
Attachments
(1 file)
660 bytes,
patch
|
justdave
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8 I setup the bugzilla 2.22 and having problem for finding the bug with version name as "---". There are already lots of bugs file under that version. But whenever I am using advance search and select version "---" its giving me Zaro results. But if i know the bug number it is able to find. Reproducible: Always
Comment 1•18 years ago
|
||
I can reproduce the bug on tip. The problem is that Search.pm uses 'anyexact' for fields having legal values... foreach my $field ($params->param()) { if (lsearch(\@legal_fields, $field) != -1) { push(@specialchart, [$field, "anyexact", join(',', $params->param($field))]); } } ... but the field value '---' is converted back to '' if the field is not a target milestone, explaining why the query returns no result with version = '---': ",anyexact" => sub { my @list; foreach my $w (split(/,/, $v)) { if ($w eq "---" && $f !~ /milestone/) { $w = ""; } $q = $dbh->quote($w); trick_taint($q); push(@list, $q); } if (@list) { $term = "$ff IN (" . join (',', @list) . ")"; } }, Is there any good reason to convert '---' into ''?
Assignee: administration → query-and-buglist
Status: UNCONFIRMED → NEW
Component: Administration → Query/Bug List
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Version: unspecified → 2.22
Comment 2•18 years ago
|
||
(In reply to comment #1) > Is there any good reason to convert '---' into ''? For resolution.
Reporter | ||
Comment 3•17 years ago
|
||
How to resolve this problem because every time if I do any search with version == ---. You always get zarro bugs found!
Reporter | ||
Updated•17 years ago
|
Severity: normal → blocker
Comment 4•17 years ago
|
||
This is not a blocker. You cannot currently search for --- in a field, and that's a known problem. Try renaming your version to "--" instead for now.
Severity: blocker → normal
Instead of converting ALL non-targets to '', why not convert resolution only? That would make more sense to me. ",anyexact" => sub { my @list; foreach my $w (split(/,/, $v)) { if ($w eq "---" && $f ~ /resolution/) { $w = ""; } $q = $dbh->quote($w); trick_taint($q); push(@list, $q); } if (@list) { $term = "$ff IN (" . join (',', @list) . ")"; } },
Assuming resolution is the ONLY time you need to convert '---' to '', here is a patch built for 3.1.2
Attachment #283601 -
Flags: review?
Attachment #283601 -
Flags: review? → review?(mkanat)
Comment 8•17 years ago
|
||
Comment on attachment 283601 [details] [diff] [review] Patch for Bugzilla/Search.pm I'm not qualified to review Search.pm--ask somebody else. (See the Reviewer List.)
Attachment #283601 -
Flags: review?(mkanat) → review?(justdave)
Comment 9•17 years ago
|
||
Comment on attachment 283601 [details] [diff] [review] Patch for Bugzilla/Search.pm joel, could you review this one-liner?
Attachment #283601 -
Flags: review?(bugreport)
Updated•17 years ago
|
Assignee: query-and-buglist → michael.j.tosh
Target Milestone: --- → Bugzilla 3.0
Comment 10•17 years ago
|
||
Comment on attachment 283601 [details] [diff] [review] Patch for Bugzilla/Search.pm We should probably be more careful on field names... what if someone creates a custom field that happens to contain the word "resolution" ;) But yes, having poked through the available values and how they're treated on the other fields, this is definitely the right fix.
Attachment #283601 -
Flags: review?(justdave)
Attachment #283601 -
Flags: review?(bugreport)
Attachment #283601 -
Flags: review+
Updated•17 years ago
|
Flags: approval?
Flags: approval3.0?
Updated•17 years ago
|
Flags: approval?
Flags: approval3.0?
Flags: approval3.0+
Flags: approval+
Assignee | ||
Comment 11•17 years ago
|
||
Can someone handle checking in this code? I am not able.
Comment 12•17 years ago
|
||
tip: Checking in Bugzilla/Search.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v <-- Search.pm new revision: 1.149; previous revision: 1.148 done 3.0.2: Checking in Bugzilla/Search.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v <-- Search.pm new revision: 1.145.2.2; previous revision: 1.145.2.1 done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Summary: I am not able to search if version is "---" → Allow to search for '---' in versions and milestones
Comment 14•16 years ago
|
||
Added to the release notes for Bugzilla 3.2 in a patch on bug 432331.
You need to log in
before you can comment on or make changes to this bug.
Description
•