Bug 178264 - XML-RPC exports empty CC list as string instead of list
Summary: XML-RPC exports empty CC list as string instead of list
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Bugzilla General
Version: 2.18
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-01-18 22:16 UTC by Igor Foox
Modified: 2007-04-18 17:36 UTC (History)
0 users

Fixed In Version: 2.18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-02 18:38:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Igor Foox 2006-01-18 22:16:07 UTC
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:
always.

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 22:20:04 UTC
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 22:37:26 UTC
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 18:38:14 UTC
Should be fixed now.


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