From 6be9f0a286b2e9abf0119173a9e66c37a7d9f0a1 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Mon, 4 Apr 2016 16:27:33 +0000 Subject: Bug 880163 - add a webservice method to list a bug's duplicates, mirroring what is visible on show_bug. r=dylan --- Bugzilla/API/1_0/Resource/Bug.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Bugzilla/API/1_0/Resource') diff --git a/Bugzilla/API/1_0/Resource/Bug.pm b/Bugzilla/API/1_0/Resource/Bug.pm index 5dc61e8d1..781ac3176 100644 --- a/Bugzilla/API/1_0/Resource/Bug.pm +++ b/Bugzilla/API/1_0/Resource/Bug.pm @@ -1491,6 +1491,9 @@ sub _bug_to_hash { if (filter_wants $params, 'tags', 'extra') { $item{'tags'} = $bug->tags; } + if (filter_wants $params, 'duplicates', 'extra') { + $item{'duplicates'} = [ map { as_int($_->id) } @{ $bug->duplicates } ]; + } # And now custom fields my @custom_fields = Bugzilla->active_custom_fields; -- cgit v1.2.3-24-g4f1b