Bug 178264 - XML-RPC exports empty CC list as string instead of list
XML-RPC exports empty CC list as string instead of list
Product: Bugzilla
Classification: Community
Component: Bugzilla General (Show other bugs)
All Linux
medium Severity medium (vote)
: ---
: ---
Assigned To: David Lawrence
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2006-01-18 17:16 EST by Igor Foox
Modified: 2007-04-18 13:36 EDT (History)
0 users

See Also:
Fixed In Version: 2.18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-02 13:38:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Igor Foox 2006-01-18 17:16:07 EST
Description of problem:
When accessing the bugzilla through XML-RPC using the bugzilla.getBug function,
the CC component is usually a list, just like dependson or blocked. However
these fields (blocked, dependson) return a list even if they are empty. CC
returns an empty string if it's empty. This can cause cast problems on the
client side, particularly I've been getting problems with Java. It can be worked
around, but would be easier if it's possible to fix it on the server-side.

How reproducible:

Steps to Reproduce:
1.Run the bugzilla.getBug function on a bug that has no CCs. 
2.Look at the type of the CC entry.

Actual results:
CC is an empty string

Expected results:
CC should be an emptly list
Comment 1 David Lawrence 2006-01-18 17:20:04 EST
What would be proper behavior in the case of an empty list? Pass it back as a
undef, string, or remove the key altogether?
Comment 2 Igor Foox 2006-01-18 17:37:26 EST
I think the proper behaviour would be to pass back an empty list, that's what
currently happens to other list-type fields like dependson and blocked. I'm not
sure if this problem exists with other list-types because I just haven't gotten
around to using other fields. But it seems correct to return an empty list so
code that iterates over that list could just have 0 iterations without extra
checking code.
Comment 3 David Lawrence 2006-02-02 13:38:14 EST
Should be fixed now.

Note You need to log in before you can comment on or make changes to this bug.