Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
e82fe9ae
Commit
e82fe9ae
authored
May 20, 2009
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 302511: Remove QuickSearch's dependency on default priority values
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=wurblzap, a=mkanat
parent
522e0849
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
Quicksearch.pm
Bugzilla/Search/Quicksearch.pm
+19
-3
No files found.
Bugzilla/Search/Quicksearch.pm
View file @
e82fe9ae
...
...
@@ -159,6 +159,7 @@ sub quicksearch {
# It's no alias either, so it's a more complex query.
my
$legal_statuses
=
get_legal_field_values
(
'bug_status'
);
my
$legal_resolutions
=
get_legal_field_values
(
'resolution'
);
my
$legal_priorities
=
get_legal_field_values
(
'priority'
);
# Globally translate " AND ", " OR ", " NOT " to space, pipe, dash.
$searchstring
=~
s/\s+AND\s+/ /g
;
...
...
@@ -313,9 +314,24 @@ sub quicksearch {
$word
,
$negate
);
}
# Priority
elsif
(
$word
=~
m/^[pP]([1-5](-[1-5])?)$/
)
{
addChart
(
'priority'
,
'regexp'
,
"[$1]"
,
$negate
);
elsif
(
grep
{
lc
(
$_
)
eq
lc
(
$word
)
}
@$legal_priorities
)
{
addChart
(
'priority'
,
'equals'
,
$word
,
$negate
);
}
# P1-5 Syntax
elsif
(
$word
=~
m/^P(\d+)(?:-(\d+))?$/i
)
{
my
$start
=
$1
-
1
;
$start
=
0
if
$start
<
0
;
my
$end
=
$2
-
1
;
$end
=
scalar
(
@$legal_priorities
)
-
1
if
$end
>
(
scalar
@$legal_priorities
-
1
);
my
$prios
=
$legal_priorities
->
[
$start
];
if
(
$end
)
{
$prios
=
join
(
','
,
@$legal_priorities
[
$start
..
$end
])
}
addChart
(
'priority'
,
'anyexact'
,
$prios
,
$negate
);
}
# Severity
elsif
(
grep
({
lc
(
$word
)
eq
substr
(
$_
,
0
,
3
)}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment