Closed Bug 584956 Opened 14 years ago Closed 14 years ago

Quick search for multi-state fields with dash in the name is broken

Categories

(bugzilla.mozilla.org :: General, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: standard8, Assigned: LpSolit)

References

()

Details

(Keywords: regression)

I have multiple queries using the quick search format, e.g. https://bugzilla.mozilla.org/buglist.cgi?quicksearch=ALL%20blocking-thunderbird3.1:.2+%20-status-thunderbird3.1:fixed%20-whiteboard:non-code&order=map_assigned_to.login_name,bugs.bug_id

They are all returning similar errors:

================
There is a problem with your search:

blocking%2Dthunderbird3.1 is not a valid field name.

status%2Dthunderbird3.1 is not a valid field name.

The legal field names are listed here.
================

Quick searches for blocking1.9.1 work fine.

The Thunderbird searches used to work not more than 2 or 3 days ago. This breaks a lot of my release tracking queries.
I suspect this change:   (picked up with the 3.6.2 update earlier tonight)

http://bzr.mozilla.org/bmo/3.6/revision/7170#Bugzilla/Search/Quicksearch.pm

But isn't that just making a subroutine that does what it was already doing?  How did that break it?
Oh, I see it... line 562...
Upstream regression from bug 553884...
Assignee: nobody → query-and-buglist
Component: Bugzilla: Other b.m.o Issues → Query/Bug List
Depends on: 553884
Product: mozilla.org → Bugzilla
QA Contact: other-bmo-issues → default-qa
Target Milestone: --- → Bugzilla 3.6
Version: other → 3.6.1
I temporarily backed out the patch from bug 553884 on b.m.o until this is sorted.
Flags: blocking3.6.3+
In standard Bugzilla, field names may not have dashes in them. So this would be a bmo-specific problem.
Assignee: query-and-buglist → nobody
Component: Query/Bug List → Bugzilla: Other b.m.o Issues
Flags: blocking3.6.3+
Product: Bugzilla → mozilla.org
QA Contact: default-qa → other-bmo-issues
Target Milestone: Bugzilla 3.6 → ---
Version: 3.6.1 → other
Ah, right, I just checked that. :) Good to know.
>--- Bugzilla/Search/Quicksearch.pm	23 Jul 2010 02:03:14 -0000	1.38
>+++ Bugzilla/Search/Quicksearch.pm	2 Aug 2010 01:56:10 -0000
>@@ -517,6 +517,7 @@ sub splitString {
>         # as it has a special meaning. Strings which start with
>         # "+" must be quoted.
>         s/(?<!^)\+/%2B/g;
>+        s/(?<!^)\-/%2D/g;
>         # Remove quotes
>         s/"//g;
>     }

The comment talks about "which start with"... If the regex actually did that instead of matching any hyphen in the field name, then having hyphens in field names (like bmo does) wouldn't be causing a problem.
The patch for bug 585028 should fix this.
Assignee: nobody → LpSolit
Status: NEW → ASSIGNED
Depends on: 585028
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Component: Bugzilla: Other b.m.o Issues → General
Product: mozilla.org → bugzilla.mozilla.org
You need to log in before you can comment on or make changes to this bug.