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
380fca01
Commit
380fca01
authored
Oct 02, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 601383: Test the chfield* search query parameters in xt/search.t.
r=mkanat, a=mkanat (module owner)
parent
a46cf131
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
FieldTestNormal.pm
xt/lib/Bugzilla/Test/Search/FieldTestNormal.pm
+15
-1
No files found.
xt/lib/Bugzilla/Test/Search/FieldTestNormal.pm
View file @
380fca01
...
...
@@ -28,6 +28,12 @@ use base qw(Bugzilla::Test::Search::FieldTest);
use
Scalar::
Util
qw(blessed)
;
use
constant
CH_OPERATOR
=>
{
changedafter
=>
'chfieldfrom'
,
changedbefore
=>
'chfieldto'
,
changedto
=>
'chfieldvalue'
,
};
# Normally, we just clone a FieldTest because that's the best for performance,
# overall--that way we don't have to translate the value again. However,
# sometimes (like in Bugzilla::Test::Search's direct code) we just want
...
...
@@ -54,11 +60,19 @@ sub search_params {
my
(
$self
)
=
@_
;
my
$field
=
$self
->
field
;
my
$operator
=
$self
->
operator
;
$field
=~
s/\./_/g
;
my
$value
=
$self
->
translated_value
;
if
(
$operator
eq
'anyexact'
)
{
$value
=
[
split
(
','
,
$value
)];
}
if
(
my
$ch_param
=
CH_OPERATOR
->
{
$operator
})
{
if
(
$field
eq
'creation_ts'
)
{
$field
=
'[Bug creation]'
;
}
return
{
chfield
=>
$field
,
$ch_param
=>
$value
};
}
$field
=~
s/\./_/g
;
return
{
$field
=>
$value
,
"${field}_type"
=>
$self
->
operator
};
}
...
...
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