gerv at mozilla.org
Thu Oct 22 16:25:12 UTC 2009
In the past, people have suggested that most fields in the Bug object
returned by the HTTP API should be always present.
The idea is that it's easier for an API user to just check for a value
without having to check for existence first. That would mean adding the
following fields with the following default values to every downloaded
"attachments" => ,
"blocks" => ,
"cc" => ,
"depends_on" => ,
"flags" => ,
"groups" => ,
"is_cc_accessible" => "0",
"is_reporter_accessible" => "0",
"keywords" => ,
"resolution" => "",
"url" => "",
(This would, of course, increase the size of every object.) However, in
the case of the following fields, which are configurable on/off in
Bugzilla preferences, the API user would still have to check for
existence before checking a value.
My suggestion is that the split between these two groups would seem to
most Bugzilla users like an artificial distinction. Given that in the
future, we might make more of the default fields optional or
configurable, it seems wrong to hard-code a list of which fields are
always present in the returned structure.
So my current plan is to only supply fields which have a value. This
keeps data size down and avoids hardcoding "special" lists of fields.
Let me know if you think this reasoning is wrong.
dev-apps-bugzilla mailing list
dev-apps-bugzilla at lists.mozilla.org
More information about the developers