summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search.pm
diff options
context:
space:
mode:
authorDavid Lawrence [:dkl] <dkl@mozilla.com>2014-06-17 09:52:16 +0200
committerByron Jones <glob@mozilla.com>2014-06-17 09:52:16 +0200
commit464be059d311db4a1bc15933ba007f45f76c11a0 (patch)
treef70d867f0b74b24b9a69d875cd6d44db937302df /Bugzilla/Search.pm
parentaaba5db2aed1ac418d6e4421c1c2760d9c739b70 (diff)
downloadbugzilla-464be059d311db4a1bc15933ba007f45f76c11a0.tar.gz
bugzilla-464be059d311db4a1bc15933ba007f45f76c11a0.tar.xz
Bug 649691: Add a "mentor" and "mentored bug type" field to b.m.o
Diffstat (limited to 'Bugzilla/Search.pm')
-rw-r--r--Bugzilla/Search.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 519ebe69f..356af1870 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -384,6 +384,9 @@ sub SPECIAL_PARSING {
# last_visit field that accept both a 1d, 1w, 1m, 1y format and the
# %last_changed% pronoun.
last_visit_ts => \&_last_visit_datetime,
+
+ # BMO - Add ability to use pronoun for bug mentors field
+ bug_mentor => \&_commenter_pronoun,
};
foreach my $field (Bugzilla->active_custom_fields) {
if ($field->type == FIELD_TYPE_DATETIME) {
@@ -425,6 +428,11 @@ use constant USER_FIELDS => {
field => 'setter_id',
join => { table => 'flags' },
},
+ # BMO - Ability to search for bugs with specific mentors
+ 'bug_mentor' => {
+ field => 'user_id',
+ join => { table => 'bug_mentors' },
+ }
};
# Backwards compatibility for times that we changed the names of fields
@@ -1701,7 +1709,7 @@ sub _special_parse_email {
$type = "anyexact" if $type eq "exact";
my $or_clause = new Bugzilla::Search::Clause('OR');
- foreach my $field (qw(assigned_to reporter cc qa_contact)) {
+ foreach my $field (qw(assigned_to reporter cc qa_contact bug_mentor)) {
if ($params->{"email$field$id"}) {
$or_clause->add($field, $type, $email);
}