Closed Bug 458189 Opened 16 years ago Closed 16 years ago

Quicksearches starting with +DUP return no results

Categories

(Bugzilla :: Query/Bug List, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.2

People

(Reporter: me, Assigned: LpSolit)

References

Details

(Keywords: regression)

Attachments

(1 file)

Quicksearches starting with +DUP return no results, those starting with just DUP work as expected.

Works on:
landfill 3.0

Fails on:
landfill 3.2
landfill tip
BMO

I'm sure this bug must be a DUP itself, but I can't find anything.
Made title clearer.
Summary: Adding +DUP to quicksearch returns no results → Quicksearches starting with +DUP return no results
That's because +DUP does a substring search for "+DUP". On BMO that now finds this bug. :) Only DUP is magically interpreted to mean bugs with resolution DUPLICATE. It's not like +FIXED works either, only FIXED.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
I think either I'm misunderstanding you or you're misunderstanding me. I'm referring to the feature described here:

https://landfill.bugzilla.org/bugzilla-tip/page.cgi?id=quicksearch.html

"Use +DUP as first word in your search to include duplicate bugs in your search"

This worked until the recent upgrade of BMO (see comment 0).

p.s. I notice that if I click the "[Help]" link on the front page of BMO it goes to quicksearchhack.html which doesn't mention +DUP at all, not sure what the significance of that is.
(In reply to comment #3)
> "Use +DUP as first word in your search to include duplicate bugs in your
> search"

Indeed. Example on that help page doesn't even work as explained. However, "DUP,FIXED table border" without the problematic + works. It also says "Use +foo to search for bugs where the summary contains foo as a substring." which also doesn't work.

It's possible that something broke or documentation is simply wrong. Either way, something needs to be fixed.

> p.s. I notice that if I click the "[Help]" link on the front page of BMO it
> goes to quicksearchhack.html which doesn't mention +DUP at all, not sure what
> the significance of that is.

I'm not sure why BMO even links to QuickSearch help from that place. The "Find a Bug" box just before help link has been changed to use the "Find a Specific Bug" search (see https://bugzilla.mozilla.org/query.cgi?query_format=specific) which is not same as QuickSearch (found in header and footer of every page).
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Severity: normal → minor
Version: unspecified → 3.2
Severity: minor → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking3.2+
Keywords: regression
Target Milestone: --- → Bugzilla 3.2
OK, we can reproduce. It's a regression due to bug 329701. splitString() converts "+" to "%2B", and so =~ /^\+[A-Z]+/ cannot find it.
Depends on: 329701
The reason to mark this bug as a blocker is to make sure we didn't regress anything else containing "+" in it, such as saved searches like "+foo", "foo+bar", "bar+".
CC'ing Marc as well in case he has some ideas on how to fix this code.

wicked also reported on IRC that this bug affects bug summaries as well due to:

            if ($firstChar eq '+') {
                foreach (@subWords) {
                    addChart('short_desc', 'substring', $qsword, $negate);
                }

which no longer works as "+" has been escaped.
(In reply to comment #7)
> wicked also reported on IRC that this bug affects bug summaries as well due 

I first said that on comment #4 but who's counting.

(In reply to comment #5)
> OK, we can reproduce. It's a regression due to bug 329701. splitString()
> converts "+" to "%2B", and so =~ /^\+[A-Z]+/ cannot find it.

This protection was needed because bug 366120 introduced URL encode/decode calls to protect special characters. And + is same as blank in URL world so it won't survive the process.
Do I understand correctly that “+DUP” should work exactly as “DUP” works? Then why do we recommend using “+DUP” to find dupes? Unless I'm missing something, we should drop support for this “+DUP” thing.

That said, and having you say that this used to work: using “+” to restrict the search term to the summary should definitely be made to work again.

On a related note, the “+” syntax is not mentioned on https://landfill.bugzilla.org/bugzilla-tip/page.cgi?id=quicksearchhack.html. Maybe we should add it there while fixing the feature.
(In reply to comment #9)
> Do I understand correctly that “+DUP” should work exactly as “DUP” works? Then
> why do we recommend using “+DUP” to find dupes? Unless I'm missing something,
> we should drop support for this “+DUP” thing.

No, starting with a + includes open bugs in addition to DUPs (or whatever you specify) as opposed to only DUPs.
Attached patch patch, v1Splinter Review
I tested my patch with DUP, +DUP, flag:review+ and +foo (with a bug summary being "foo" as well), and they all pass successfully. I didn't do any other check as I don't have any other testcase in mind right now.

What my patch does it to not escape "+" if it's the first character, as it has a special meaning. If you are explicitly looking for a word starting with "+", you should quote the string.
Assignee: query-and-buglist → LpSolit
Status: NEW → ASSIGNED
Attachment #341860 - Flags: review?(wurblzap)
Attachment #341860 - Flags: review?(wicked)
Comment on attachment 341860 [details] [diff] [review]
patch, v1

Works as I expect it to; r=Wurblzap.
Attachment #341860 - Flags: review?(wurblzap) → review+
Comment on attachment 341860 [details] [diff] [review]
patch, v1

Indeed.

QuickSearch doc pages could benefit from a rewrite. Something like combining the two pages and adding a clear list of the full syntax that is available. I think that might help users to understand power of QS more easily as well as help us understand what code logic is supposed to do in all the different and even mysterious cases.
Attachment #341860 - Flags: review?(wicked) → review+
Flags: approval3.2+
Flags: approval+
tip:

Checking in Bugzilla/Search/Quicksearch.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search/Quicksearch.pm,v  <--  Quicksearch.pm
new revision: 1.21; previous revision: 1.20
done

3.2rc1:

Checking in Bugzilla/Search/Quicksearch.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search/Quicksearch.pm,v  <--  Quicksearch.pm
new revision: 1.20.2.1; previous revision: 1.20
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: