summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-12-04 15:41:27 +0100
committermkanat%bugzilla.org <>2009-12-04 15:41:27 +0100
commit9eec51298014aa1e759ce06342b0766e04f87d36 (patch)
tree514ce882f5bb0709884de41d10810ea275b0b8f1
parente6ada97a31509556ea70ce5cf4b6aaeef9ca3371 (diff)
downloadbugzilla-9eec51298014aa1e759ce06342b0766e04f87d36.tar.gz
bugzilla-9eec51298014aa1e759ce06342b0766e04f87d36.tar.xz
Bug 526162: Make the "private" argument to Bug.add_comment into "is_private", for consistency.
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
-rw-r--r--Bugzilla/WebService/Bug.pm16
1 files changed, 12 insertions, 4 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm
index 5c38ebc49..ad4bb9f30 100644
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -353,9 +353,13 @@ sub add_comment {
Bugzilla->user->can_edit_product($bug->product_id)
|| ThrowUserError("product_edit_denied", {product => $bug->product});
-
+
+ # Backwards-compatibility for versions before 3.6
+ if (defined $params->{private}) {
+ $params->{is_private} = delete $params->{private};
+ }
# Append comment
- $bug->add_comment($comment, { isprivate => $params->{private},
+ $bug->add_comment($comment, { isprivate => $params->{is_private},
work_time => $params->{work_time} });
# Capture the call to bug->update (which creates the new comment) in
@@ -1519,8 +1523,8 @@ comment to.
If this is empty or all whitespace, an error will be thrown saying that
you did not set the C<comment> parameter.
-=item C<private> (boolean) - If set to true, the comment is private, otherwise
-it is assumed to be public.
+=item C<is_private> (boolean) - If set to true, the comment is private,
+otherwise it is assumed to be public.
=item C<work_time> (double) - Adds this many hours to the "Hours Worked"
on the bug. If you are not in the time tracking group, this value will
@@ -1567,6 +1571,10 @@ You tried to add a private comment, but don't have the necessary rights.
=item Modified to throw an error if you try to add a private comment
but can't, in Bugzilla B<3.4>.
+=item Before Bugzilla B<3.6>, the C<is_private> argument was called
+C<private>, and you can still call it C<private> for backwards-compatibility
+purposes if you wish.
+
=back
=back