Red Hat Bugzilla – Bug 178264
XML-RPC exports empty CC list as string instead of list
Last modified: 2007-04-18 13:36:20 EDT
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.
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.
CC is an empty string
CC should be an emptly list
What would be proper behavior in the case of an empty list? Pass it back as a
undef, string, or remove the key altogether?
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
Should be fixed now.