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
5323ab05
Commit
5323ab05
authored
Oct 25, 2008
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 459064: Set FIELD_TYPE_SINGLE_SELECT on standard global select fields
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bbaetz, a=mkanat
parent
3cea9188
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
32 deletions
+8
-32
Search.pm
Bugzilla/Search.pm
+5
-18
Bug.pm
Bugzilla/WebService/Bug.pm
+3
-14
No files found.
Bugzilla/Search.pm
View file @
5323ab05
...
...
@@ -53,12 +53,6 @@ use Date::Parse;
# to, in order.
use
constant
SPECIAL_ORDER
=>
{
'bugs.target_milestone'
=>
[
'ms_order.sortkey'
,
'ms_order.value'
],
'bugs.bug_status'
=>
[
'bug_status.sortkey'
,
'bug_status.value'
],
'bugs.rep_platform'
=>
[
'rep_platform.sortkey'
,
'rep_platform.value'
],
'bugs.priority'
=>
[
'priority.sortkey'
,
'priority.value'
],
'bugs.op_sys'
=>
[
'op_sys.sortkey'
,
'op_sys.value'
],
'bugs.resolution'
=>
[
'resolution.sortkey'
,
'resolution.value'
],
'bugs.bug_severity'
=>
[
'bug_severity.sortkey'
,
'bug_severity.value'
]
};
# When we add certain fields to the ORDER BY, we need to then add a
...
...
@@ -66,12 +60,6 @@ use constant SPECIAL_ORDER => {
# the join statements that need to be added.
use
constant
SPECIAL_ORDER_JOIN
=>
{
'bugs.target_milestone'
=>
'LEFT JOIN milestones AS ms_order ON ms_order.value = bugs.target_milestone AND ms_order.product_id = bugs.product_id'
,
'bugs.bug_status'
=>
'LEFT JOIN bug_status ON bug_status.value = bugs.bug_status'
,
'bugs.rep_platform'
=>
'LEFT JOIN rep_platform ON rep_platform.value = bugs.rep_platform'
,
'bugs.priority'
=>
'LEFT JOIN priority ON priority.value = bugs.priority'
,
'bugs.op_sys'
=>
'LEFT JOIN op_sys ON op_sys.value = bugs.op_sys'
,
'bugs.resolution'
=>
'LEFT JOIN resolution ON resolution.value = bugs.resolution'
,
'bugs.bug_severity'
=>
'LEFT JOIN bug_severity ON bug_severity.value = bugs.bug_severity'
};
# Create a new Search
...
...
@@ -117,8 +105,8 @@ sub init {
my
%
special_order
=
%
{
SPECIAL_ORDER
()};
my
%
special_order_join
=
%
{
SPECIAL_ORDER_JOIN
()};
my
@select_fields
=
Bugzilla
->
get_fields
({
type
=>
FIELD_TYPE_SINGLE_SELECT
,
obsolete
=>
0
});
my
@select_fields
=
Bugzilla
->
get_fields
({
type
=>
FIELD_TYPE_SINGLE_SELECT
});
my
@multi_select_fields
=
Bugzilla
->
get_fields
({
type
=>
FIELD_TYPE_MULTI_SELECT
,
obsolete
=>
0
});
...
...
@@ -220,10 +208,9 @@ sub init {
}
}
my
@legal_fields
=
(
"product"
,
"version"
,
"rep_platform"
,
"op_sys"
,
"bug_status"
,
"resolution"
,
"priority"
,
"bug_severity"
,
"assigned_to"
,
"reporter"
,
"component"
,
"classification"
,
"target_milestone"
,
"bug_group"
);
my
@legal_fields
=
(
"product"
,
"version"
,
"assigned_to"
,
"reporter"
,
"component"
,
"classification"
,
"target_milestone"
,
"bug_group"
);
# Include custom select fields.
push
(
@legal_fields
,
map
{
$_
->
name
}
@select_fields
);
...
...
Bugzilla/WebService/Bug.pm
View file @
5323ab05
...
...
@@ -45,15 +45,6 @@ use constant FIELD_MAP => {
platform
=>
'rep_platform'
,
};
use
constant
GLOBAL_SELECT_FIELDS
=>
qw(
bug_severity
bug_status
op_sys
priority
rep_platform
resolution
)
;
use
constant
PRODUCT_SPECIFIC_FIELDS
=>
qw(version target_milestone component)
;
######################################################
...
...
@@ -192,13 +183,11 @@ sub legal_values {
my
(
$self
,
$params
)
=
@_
;
my
$field
=
FIELD_MAP
->
{
$params
->
{
field
}}
||
$params
->
{
field
};
my
@custom_select
=
Bugzilla
->
get_fields
(
{
custom
=>
1
,
type
=>
[
FIELD_TYPE_SINGLE_SELECT
,
FIELD_TYPE_MULTI_SELECT
]});
# We only want field names.
@custom_select
=
map
{
$_
->
name
}
@custom_select
;
my
@global_selects
=
Bugzilla
->
get_fields
(
{
type
=>
[
FIELD_TYPE_SINGLE_SELECT
,
FIELD_TYPE_MULTI_SELECT
]});
my
$values
;
if
(
grep
(
$_
eq
$field
,
GLOBAL_SELECT_FIELDS
,
@custom_select
))
{
if
(
grep
(
$_
->
name
eq
$field
,
@global_selects
))
{
$values
=
get_legal_field_values
(
$field
);
}
elsif
(
grep
(
$_
eq
$field
,
PRODUCT_SPECIFIC_FIELDS
))
{
...
...
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