summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/Bug.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/WebService/Bug.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/WebService/Bug.pm')
-rw-r--r--Bugzilla/WebService/Bug.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm
index a82f55d3b..0a8145d37 100644
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -1376,6 +1376,14 @@ sub _bug_to_hash {
$item{'is_creator_accessible'} = $self->type('boolean', $bug->reporter_accessible);
}
+ # BMO - support for special mentors field
+ if (filter_wants $params, 'mentors') {
+ $item{'mentors'}
+ = [ map { $self->type('email', $_->login) } @{ $bug->mentors || [] } ];
+ $item{'mentors_detail'}
+ = [ map { $self->_user_to_hash($_, $params, undef, 'mentors') } @{ $bug->mentors } ];
+ }
+
return \%item;
}