summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-04-13 07:52:30 +0200
committerDave Lawrence <dlawrence@mozilla.com>2012-04-13 07:52:30 +0200
commit9eca3cf30a47e5186a6edd1a36f8023aff595105 (patch)
tree6beee2f1e8c9ae62c9b2a397c9f516e27070848c /Bugzilla/WebService
parent6620c43ae99c3f79fb1450b5f11e9b3c57057429 (diff)
downloadbugzilla-9eca3cf30a47e5186a6edd1a36f8023aff595105.tar.gz
bugzilla-9eca3cf30a47e5186a6edd1a36f8023aff595105.tar.xz
Bug 737850 - Bug.history and Bug.get use different field names
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r--Bugzilla/WebService/Bug.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm
index 3a55a097b..5e55699c4 100644
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -362,8 +362,10 @@ sub history {
my $ids = $params->{ids};
defined $ids || ThrowCodeError('param_required', { param => 'ids' });
- my @return;
+ my %api_name = reverse %{ Bugzilla::Bug::FIELD_MAP() };
+ $api_name{'bug_group'} = 'groups';
+ my @return;
foreach my $bug_id (@$ids) {
my %item;
my $bug = Bugzilla::Bug->check($bug_id);
@@ -379,14 +381,15 @@ sub history {
$bug_history{who} = $self->type('string', $changeset->{who});
$bug_history{changes} = [];
foreach my $change (@{ $changeset->{changes} }) {
+ my $api_field = $api_name{$change->{fieldname}} || $change->{fieldname};
my $attach_id = delete $change->{attachid};
if ($attach_id) {
$change->{attachment_id} = $self->type('int', $attach_id);
}
$change->{removed} = $self->type('string', $change->{removed});
$change->{added} = $self->type('string', $change->{added});
- $change->{field_name} = $self->type('string',
- delete $change->{fieldname});
+ $change->{field_name} = $self->type('string', $api_field);
+ delete $change->{fieldname};
push (@{$bug_history{changes}}, $change);
}
@@ -2183,6 +2186,10 @@ The same as L</get>.
=item Added in Bugzilla B<3.4>.
+=item Field names changed to be more consistent with other methods in Bugzilla B<4.4>.
+
+=item As of Bugzilla B<4.4>, field names now match names used by L<Bug.update|/"update"> for consistency.
+
=back
=back