Closed Bug 302511 Opened 19 years ago Closed 15 years ago

Remove QuickSearch's dependency on default priority values

Categories

(Bugzilla :: Query/Bug List, enhancement, P4)

2.21
enhancement

Tracking

()

RESOLVED FIXED
Bugzilla 3.6

People

(Reporter: Wurblzap, Assigned: mkanat)

References

Details

Attachments

(1 file, 3 obsolete files)

QuickSearch offers a feature to restrict the result set to a range of
priorities. This relies on each of the legal priority values to match
/[pP][1-5]/
(http://lxr.mozilla.org/mozilla/source/webtools/bugzilla/quicksearch.js#533).
This feature stops working if you modify the list of legal priority values away
from the default.

It should be possible to use the same QuickSearch syntax to address priorities
ordered by sortkey, so that p1 matches the priority value with the lowest
sortkey, p2 matches the next one and so on.
Priority: -- → P4
Assignee: query-and-buglist → mkanat
Blocks: 488931
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 3.6
Attached patch v1 (obsolete) — Splinter Review
Pretty simple fix.
Attachment #373408 - Flags: review?(LpSolit)
Comment on attachment 373408 [details] [diff] [review]
v1

This patch breaks searching for priority ranges. It's good to add the priority match, but the "p" syntax should stay supported. See comment 0.
Attachment #373408 - Flags: review?(LpSolit) → review-
Comment on attachment 373408 [details] [diff] [review]
v1

Yeah, I'd rather just remove that functionality now that the default priorities won't be P1 - P5 and it won't make sense (nor will it be discoverable).
Attachment #373408 - Flags: review?(LpSolit)
I'm not allowed to override Marc's review. So even if I granted review, Marc's r- would still stand.
Please leave the "p" syntax in for backwards compatibility. Removing this would annoy people on legacy installations who use p1-2 routinely.

This is already discoverable on page.cgi?id=quicksearchhack.html.
Attachment #373408 - Flags: review?(LpSolit)
Comment on attachment 373408 [details] [diff] [review]
v1

Hum yes, Marc is right. Old installations will still use P1-P5 by default.
(In reply to comment #7)
> (From update of attachment 373408 [details] [diff] [review])
> Hum yes, Marc is right. Old installations will still use P1-P5 by default.

  That's not the point Marc was making.
Attached patch v2 (obsolete) — Splinter Review
Okay, this preserves the syntax. Tested on landfill.
Attachment #373408 - Attachment is obsolete: true
Attachment #373547 - Flags: review?(wurblzap)
Comment on attachment 373547 [details] [diff] [review]
v2

Yeah, this appears to be exactly what's needed. The new regexp looks strange to me (?:) at first glance; I'll take a closer look.
(?:) means "don't capture this, these parentheses are purely to delimit some group of characters that we are then going to say something about" (in this case, that the group is optional).
Attachment #373547 - Flags: review?(wurblzap) → review-
Comment on attachment 373547 [details] [diff] [review]
v2

If I ask for p7-9, I get a cryptic error message.

The code must check for legal start and end values. If one of them is out of range, addChart() shouldn't be called.

Similarly, it shouldn't be called if the upper limit is lower than the lower limit.

In addition, both \d should be replaced by \d+.
Attached patch v3 (obsolete) — Splinter Review
Okay, fixed it.
Attachment #373547 - Attachment is obsolete: true
Attachment #374979 - Flags: review?(wurblzap)
Attached patch v4Splinter Review
There was a slight error in the last patch.

Also, I don't see a problem with the first item being higher than the second. It seems to still work--it just doesn't include the second item, and that's clear when you do the search, since Bugzilla now tells you what you searched for. I don't see a Perl warning or anything caused by it.
Attachment #374979 - Attachment is obsolete: true
Attachment #374980 - Flags: review?(wurblzap)
Attachment #374979 - Flags: review?(wurblzap)
Comment on attachment 374980 [details] [diff] [review]
v4

Yeah, this is good.

I don't know what I've seen with reversed limits.
Attachment #374980 - Flags: review?(wurblzap) → review+
Flags: approval+
Checking in Bugzilla/Search/Quicksearch.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search/Quicksearch.pm,v  <--  Quicksearch.pm
new revision: 1.24; previous revision: 1.23
done
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Blocks: 585028
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: