summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-07 00:09:24 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-07 00:09:24 +0200
commit569c6b69a7cb3c458279efbdfed1b104cd3d9ae5 (patch)
tree4e43c08d0a49bf5debf89d1e179844bb044cb823 /Bugzilla
parent6576acaeea46e81f45ae5abf846166e538d1a9b6 (diff)
downloadbugzilla-569c6b69a7cb3c458279efbdfed1b104cd3d9ae5.tar.gz
bugzilla-569c6b69a7cb3c458279efbdfed1b104cd3d9ae5.tar.xz
Bug 574995: Make the WebService return reporter, attachment submitter, and
commenter all as "creator" r=timello, a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Bug.pm1
-rw-r--r--Bugzilla/WebService/Bug.pm36
2 files changed, 31 insertions, 6 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 08026f1a3..7d86fe328 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -266,6 +266,7 @@ use constant MAX_LINE_LENGTH => 254;
# use.)
use constant FIELD_MAP => {
creation_time => 'creation_ts',
+ creator => 'reporter',
description => 'comment',
id => 'bug_id',
last_change_time => 'delta_ts',
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<boolean> True if the attachment is a patch, False otherwise.
-=item C<attacher>
+=item C<creator>
C<string> The login name of the user that created the attachment.
+Also returned as C<attacher>, for backwards-compatibility with older
+Bugzillas. (However, this backwards-compatibility will go away in Bugzilla
+5.0.)
+
=back
=item B<Errors>
@@ -1125,6 +1129,9 @@ private attachments.
=item Added in Bugzilla B<3.6>.
+=item In Bugzilla B<4.0>, the C<attacher> return value was renamed to
+C<creator>.
+
=back
=back
@@ -1219,10 +1226,14 @@ ID of that attachment. Otherwise it will be null.
C<string> The actual text of the comment.
-=item author
+=item creator
C<string> The login name of the comment's author.
+Also returned as C<author>, for backwards-compatibility with older
+Bugzillas. (However, this backwards-compatibility will go away in Bugzilla
+5.0.)
+
=item time
C<dateTime> The time (in Bugzilla's timezone) that the comment was added.
@@ -1263,6 +1274,9 @@ that id.
=item C<attachment_id> was added to the return value in Bugzilla B<3.6>.
+=item In Bugzilla B<4.0>, the C<author> return value was renamed to
+C<creator>.
+
=back
=back
@@ -1643,6 +1657,10 @@ don't want this, be sure to also specify the C<product> argument.
C<dateTime> Searches for bugs that were created at this time or later.
May not be an array.
+=item C<creator>
+
+C<string> The login name of the user who created the bug.
+
=item C<id>
C<int> The numeric id of the bug.
@@ -1679,10 +1697,13 @@ C<string> The Priority field on a bug.
C<string> The name of the Product that the bug is in.
-=item C<reporter>
+=item C<creator>
C<string> The login name of the user who reported the bug.
+You can also pass this argument with the name C<reporter>, for
+backwards compatibility with older Bugzillas.
+
=item C<resolution>
C<string> The current resolution--only set if a bug is closed. You can
@@ -1763,6 +1784,9 @@ for that value.
=item Searching by C<votes> was removed in Bugzilla B<4.0>.
+=item The C<reporter> input parameter was renamed to C<creator>
+in Bugzilla B<4.0>.
+
=back
=back