From bc19204d3dffa448b364bfa4b5691a24f39f6765 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 4 Dec 2009 14:28:47 +0000 Subject: Bug 452919: Allow the "created an attachment" message in comments to be localized Patch by Max Kanat-Alexander r=LpSolit, a=LpSolit --- Bugzilla/WebService/Bug.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Bugzilla/WebService') diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 006fa0fee..5c38ebc49 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -139,6 +139,8 @@ sub comments { # Helper for Bug.comments sub _translate_comment { my ($self, $comment, $filters) = @_; + my $attach_id = $comment->is_about_attachment ? $comment->extra_data + : undef; return filter $filters, { id => $self->type('int', $comment->id), bug_id => $self->type('int', $comment->bug_id), @@ -146,6 +148,7 @@ sub _translate_comment { time => $self->type('dateTime', $comment->creation_ts), is_private => $self->type('boolean', $comment->is_private), text => $self->type('string', $comment->body_full), + attachment_id => $self->type('int', $attach_id), }; } @@ -786,6 +789,11 @@ C The globally unique ID for the comment. C The ID of the bug that this comment is on. +=item attachment_id + +C If the comment was made on an attachment, this will be the +ID of that attachment. Otherwise it will be null. + =item text C The actual text of the comment. @@ -826,6 +834,16 @@ that id. =back +=item B + +=over + +=item Added in Bugzilla B<3.4>. + +=item C was added to the return value in Bugzilla B<3.6>. + +=back + =back -- cgit v1.2.3-24-g4f1b