From 569c6b69a7cb3c458279efbdfed1b104cd3d9ae5 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Tue, 6 Jul 2010 15:09:24 -0700 Subject: Bug 574995: Make the WebService return reporter, attachment submitter, and commenter all as "creator" r=timello, a=mkanat --- Bugzilla/WebService/Bug.pm | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'Bugzilla/WebService') diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index ec970a581..dd46d870e 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -290,6 +290,7 @@ sub _translate_comment { return filter $filters, { id => $self->type('int', $comment->id), bug_id => $self->type('int', $comment->bug_id), + creator => $self->type('string', $comment->author->login), author => $self->type('string', $comment->author->login), time => $self->type('dateTime', $comment->creation_ts), is_private => $self->type('boolean', $comment->is_private), @@ -695,8 +696,6 @@ sub _attachment_to_hash { # Skipping attachment flags for now. delete $attach->{flags}; - my $attacher = new Bugzilla::User($attach->attacher->id); - return filter $filters, { creation_time => $self->type('dateTime', $attach->attached), last_change_time => $self->type('dateTime', $attach->modification_time), @@ -709,7 +708,8 @@ sub _attachment_to_hash { is_obsolete => $self->type('int', $attach->isobsolete), is_url => $self->type('int', $attach->isurl), is_patch => $self->type('int', $attach->ispatch), - attacher => $self->type('string', $attacher->login) + creator => $self->type('string', $attach->attacher->login), + attacher => $self->type('string', $attach->attacher->login), }; } @@ -1098,10 +1098,14 @@ parameter enabled. C True if the attachment is a patch, False otherwise. -=item C +=item C C The login name of the user that created the attachment. +Also returned as C, for backwards-compatibility with older +Bugzillas. (However, this backwards-compatibility will go away in Bugzilla +5.0.) + =back =item B @@ -1125,6 +1129,9 @@ private attachments. =item Added in Bugzilla B<3.6>. +=item In Bugzilla B<4.0>, the C return value was renamed to +C. + =back =back @@ -1219,10 +1226,14 @@ ID of that attachment. Otherwise it will be null. C The actual text of the comment. -=item author +=item creator C The login name of the comment's author. +Also returned as C, for backwards-compatibility with older +Bugzillas. (However, this backwards-compatibility will go away in Bugzilla +5.0.) + =item time C The time (in Bugzilla's timezone) that the comment was added. @@ -1263,6 +1274,9 @@ that id. =item C was added to the return value in Bugzilla B<3.6>. +=item In Bugzilla B<4.0>, the C return value was renamed to +C. + =back =back @@ -1643,6 +1657,10 @@ don't want this, be sure to also specify the C argument. C Searches for bugs that were created at this time or later. May not be an array. +=item C + +C The login name of the user who created the bug. + =item C C The numeric id of the bug. @@ -1679,10 +1697,13 @@ C The Priority field on a bug. C The name of the Product that the bug is in. -=item C +=item C C The login name of the user who reported the bug. +You can also pass this argument with the name C, for +backwards compatibility with older Bugzillas. + =item C C The current resolution--only set if a bug is closed. You can @@ -1763,6 +1784,9 @@ for that value. =item Searching by C was removed in Bugzilla B<4.0>. +=item The C input parameter was renamed to C +in Bugzilla B<4.0>. + =back =back -- cgit v1.2.3-24-g4f1b