From f770095a34894673cfecf1caf520b8ab87038e81 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Thu, 21 Oct 2010 01:24:05 +0200 Subject: Bug 598014: Document how to mark the initial comment as private when using Bug.create() r/a=mkanat --- Bugzilla/Bug.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Bugzilla/Bug.pm') diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 70f3f607d..b8178b9ce 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -260,6 +260,7 @@ use constant FIELD_MAP => { blocks => 'blocked', is_confirmed => 'everconfirmed', cc_accessible => 'cclist_accessible', + commentprivacy => 'comment_is_private', creation_time => 'creation_ts', creator => 'reporter', description => 'comment', @@ -1405,7 +1406,7 @@ sub _check_comment { } # Load up some data - my $isprivate = $params->{commentprivacy}; + my $isprivate = delete $params->{comment_is_private}; my $timestamp = $params->{creation_ts}; # Create the new comment so we can check it @@ -1420,9 +1421,6 @@ sub _check_comment { $comment->{isprivate} = $isprivate; } - # Don't need this anymore as it is now in the comment hash - delete $params->{commentprivacy}; - # Validate comment. We have to do this special as a comment normally # requires a bug to be already created. For a new bug, the first comment # obviously can't get the bug if the bug is created after this -- cgit v1.2.3-24-g4f1b