From 86d6af6970a887fa12ee65aacdb9086836d773fd Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Tue, 1 Mar 2011 07:19:05 -0800 Subject: Bug 616341: Make "tag" a valid search field in Search.pm, for the new tagging system r=mkanat, a=mkanat (module owner) --- xt/lib/Bugzilla/Test/Search/Constants.pm | 4 +++- xt/lib/Bugzilla/Test/Search/FieldTest.pm | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'xt/lib/Bugzilla/Test/Search') diff --git a/xt/lib/Bugzilla/Test/Search/Constants.pm b/xt/lib/Bugzilla/Test/Search/Constants.pm index 256917ec7..6cb25126e 100644 --- a/xt/lib/Bugzilla/Test/Search/Constants.pm +++ b/xt/lib/Bugzilla/Test/Search/Constants.pm @@ -260,7 +260,7 @@ use constant GREATERTHAN_BROKEN => ( # # allwordssubstr on longdescs fields matches against a single comment, # instead of matching against all comments on a bug. Same is true -# for cc, keywords, and bug_group. +# for cc and bug_group. use constant ALLWORDS_BROKEN => ( bug_group => { contains => [1] }, cc => { contains => [1] }, @@ -710,6 +710,7 @@ use constant GREATERTHAN_OVERRIDE => ( rep_platform => { contains => [2,3,4,5] }, short_desc => { contains => [2,3,4,5] }, version => { contains => [2,3,4,5] }, + tag => { contains => [1,2,3,4] }, target_milestone => { contains => [2,3,4,5] }, # Bug 2 is the only bug besides 1 that has a Requestee set. 'requestees.login_name' => { contains => [2] }, @@ -757,6 +758,7 @@ use constant CHANGED_OVERRIDE => ( 'attachments.submitter' => { contains => [] }, bug_id => { contains => [] }, reporter => { contains => [] }, + tag => { contains => [] }, ); ######### diff --git a/xt/lib/Bugzilla/Test/Search/FieldTest.pm b/xt/lib/Bugzilla/Test/Search/FieldTest.pm index e57fd2a59..400ca3263 100644 --- a/xt/lib/Bugzilla/Test/Search/FieldTest.pm +++ b/xt/lib/Bugzilla/Test/Search/FieldTest.pm @@ -350,6 +350,9 @@ sub _field_values_for_bug { elsif ($field eq 'see_also') { @values = $self->_values_for($number, 'see_also', 'name'); } + elsif ($field eq 'tag') { + @values = $self->_values_for($number, 'tags'); + } # Bugzilla::Bug truncates creation_ts, but we need the full value # from the database. This has no special value for changedfrom, # because it never changes. -- cgit v1.2.3-24-g4f1b