Bug 826969

Summary: BZ: "private comment checkbox by default" setting affects XMLRPC
Product: [Community] Bugzilla Reporter: Tomas Hoger <thoger>
Component: WebServiceAssignee: Simon Green <sgreen>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.2CC: ebaak, jfearn, scorneli, vdanen
Target Milestone: 4.2-3   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.2.1-3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-12 22:51:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomas Hoger 2012-05-31 10:37:35 UTC
Description of problem:
BZ provides following setting in user preferences:

  Set the private comment checkbox by default for new comments  (Default: off)

The name does not hint it, but it does affect XMLRPC too.  When using Bug.create and no comment_is_private is provided with the request, the value of that setting is used to determine whether comment 0 is made public or private.  This is inconsistent with the documentation:

https://bugzilla.redhat.com/docs/en/html/api/Bugzilla/WebService/Bug.html#create

  comment_is_private (boolean) - If set to true, the description is private,
  otherwise it is assumed to be public.

Additionally, this is also inconsistent across various API calls.  When using Bug.update with:

   'comment' => {
     'body' => 'comment text'
   },

with no is_private value provided, new comment is added as public even when the option is set to On.

Comment 1 Tomas Hoger 2012-05-31 10:43:31 UTC
Note that this does not seem to be new problem in BZ 4.2, as it seems bug creation was affected by this setting before.

Comment 2 Simon Green 2012-05-31 12:13:15 UTC
The correct behaviour is for comments to be created as private if no is_private value is provided, and the user has that option selected. Therefore we need to make three changes:

1) Update the text of the option to 'Make new comments private by default', thus clarifying the option to the users
2) Update the RPC documentation to reflect this. The documentation comes from upstream, which does not have this option.
3) Go through all the Bug.* RPC calls, and make sure that they honour the users setting for this option.

Hotfix reason: Inconsistency between documentation and functionality. Not what a user would expect.

Comment 3 Jeff Fearn 🐞 2012-06-04 03:43:29 UTC
Documentation isn't urgent and should be fixed in a minor release.

Comment 5 Simon Green 2012-06-26 06:29:34 UTC
Changes committed in code, as part of the Bugzilla 4.2.1-3 release.

(In reply to comment #2)
> 1) Update the text of the option to 'Make new comments private by default',
> thus clarifying the option to the users
Done.

> 2) Update the RPC documentation to reflect this. The documentation comes
> from upstream, which does not have this option.
Done.

> 3) Go through all the Bug.* RPC calls, and make sure that they honour the
> users setting for this option.

The calls that honour this value are:
Bug.create
Bug.update
Bug.add_comment
Bug.add_attachment

The RedHat.* and bugzilla.* calls won't be updated, as these will be depreciated one day.

  -- simon

Comment 6 Simon Green 2012-07-09 07:25:39 UTC
This change is due to go live at 9pm UTC today (Monday July 9th)

  -- simon

Comment 7 Simon Green 2012-07-09 21:02:01 UTC
The release date has been changed to 9pm UTC this Thursday (July 12th). Sorry for any inconvenience this late change may cause.

  -- simon

Comment 8 logarypintid 2023-07-26 06:02:34 UTC Comment hidden (spam)