Closed Bug 897746 Opened 11 years ago Closed 11 years ago

BMO tracking fields do not show visibility values in the webservice API as it uses custom code for showing/hiding fields in the UI

Categories

(bugzilla.mozilla.org :: API, defect)

Development
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 904988

People

(Reporter: erik.bryn, Assigned: glob)

Details

API response: https://bugzilla-dev.allizom.org/rest/field/bug

I see many custom fields defined, and it appears from using the UI that the custom fields are configured with visibility_field and visibility_values, but that data isn't being returned in the REST API response.
The affect of this is that I can't properly show custom fields when displaying a bug creation / editing form.
Actually the tracking fields that you see in show_bug.cgi, which are custom fields in the Bugzilla database, are not controlled by the visibility fields/values like normal custom fields are. We have custom code, implemented in the BMO extension, that shows/hides them depending on the product/component selected. This has been done this way for quite some time and we continued to expand on it without thinking about whether to show it in the API. We will need to figure out how to either A) convert the custom code magic to look like normal visibility fields/values in the API data returned, or B) create an API call that returns the custom data structure that we have embedded in the extension code that can be used to accomplish what you need. I will talk to glob about this and see if we can come up with a plan.

For reference, here is the code block that dictates which fields are visible and when in the BMO extension:
http://bzr.mozilla.org/bmo/4.2/annotate/head:/extensions/BMO/lib/Data.pm#L54

dkl
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Mac OS X → All
Hardware: x86 → All
Summary: visibility_field values missing from REST API response → BMO tracking fields do show visibility values in the webservice API as it uses custom code for showing/hiding fields in the UI
OK, thanks for the explanation. I would also like to explore adding the ability to filter the fields API response by product or component. Right now the API returns 60,000 lines of JSON, which is pretty intense. It would be nice to be able to fetch the custom field information on an as-needed basis.
(In reply to Erik Bryn from comment #3)
> OK, thanks for the explanation. I would also like to explore adding the
> ability to filter the fields API response by product or component. Right now
> the API returns 60,000 lines of JSON, which is pretty intense. It would be
> nice to be able to fetch the custom field information on an as-needed basis.

please file a different bug for that request.  fwiw i don't think there should be any difference to a consumer if a field is custom or not -- that's a backend implementation detail.
Summary: BMO tracking fields do show visibility values in the webservice API as it uses custom code for showing/hiding fields in the UI → BMO tracking fields do not show visibility values in the webservice API as it uses custom code for showing/hiding fields in the UI
Assignee: nobody → glob
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.