Bug 452919: Allow the "created an attachment" message in comments to be localized
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit git-svn-id: svn://10.0.0.236/trunk@259167 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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<int> The globally unique ID for the comment.
|
||||
|
||||
C<int> The ID of the bug that this comment is on.
|
||||
|
||||
=item attachment_id
|
||||
|
||||
C<int> If the comment was made on an attachment, this will be the
|
||||
ID of that attachment. Otherwise it will be null.
|
||||
|
||||
=item text
|
||||
|
||||
C<string> The actual text of the comment.
|
||||
@@ -826,6 +834,16 @@ that id.
|
||||
|
||||
=back
|
||||
|
||||
=item B<History>
|
||||
|
||||
=over
|
||||
|
||||
=item Added in Bugzilla B<3.4>.
|
||||
|
||||
=item C<attachment_id> was added to the return value in Bugzilla B<3.6>.
|
||||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user