Bug 911460

Summary: Bug.update documentation for 'alias' is wrong
Product: [Community] Bugzilla Reporter: Rohan McGovern <rmcgover>
Component: WebServiceAssignee: Simon Green <sgreen>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.4CC: ebaak, jingwang
Target Milestone: 4.4-3   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.4-3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-20 11:06:29 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:
Bug Depends On:    
Bug Blocks: 858932    

Description Rohan McGovern 2013-02-15 05:07:57 UTC
At time of writing, documentation at https://bugzilla.redhat.com/docs/en/html/api/Bugzilla/WebService/Bug.html#update for the 'alias' parameter says:

> (string) The alias of the bug. You can only set this
> if you are modifying a single bug. If there is more than
> one bug specified in ids, passing in a value for alias will
> cause an error to be thrown.

However, attempting to call Bug.update with alias set to a string gives an error of the form:

>  Not a HASH reference at Bugzilla/Bug.pm line 2778.

(observed on version 4.4.rc1-2.b01)

From inspecting the code, it looks like Red Hat's bugzilla treats "alias" as a list field with add/remove operations, but the documentation hasn't been updated to reflect this.

Comment 1 Simon Green 2013-02-15 05:24:43 UTC
(In reply to comment #0)
> From inspecting the code, it looks like Red Hat's bugzilla treats "alias" as
> a list field with add/remove operations, but the documentation hasn't been
> updated to reflect this.

It should be able to take a string or a hash (just like the components and version do for upstream compatibility). The solution is to fix the code, not the documentation :)

Comment 4 Simon Green 2013-02-20 00:59:46 UTC
I take back what I said in comment #1. For updates, we really do need to do it properly to reduce the amount of hackage required. Therefore the documentation will be updated.

  -- simon