Allow API to return inactive custom fields including old tracking flags

RESOLVED DUPLICATE of bug 1508695

Status

()

enhancement
RESOLVED DUPLICATE of bug 1508695
2 months ago
a month ago

People

(Reporter: kohei, Assigned: kohei)

Tracking

(Blocks 1 bug)

Production

Firefox Tracking Flags

(Not tracked)

Details

Somehow nobody has filed or noticed this bug, but as :marco pointed out on IRC, the current /rest/bug API doesn’t return inactive custom fields like cf_status_firefox33 even if it’s set. Maybe we could add a new filter like include_fields=custom_all that returns all the fields including old ones.

https://github.com/mozilla-bteam/bmo/blob/master/Bugzilla/WebService/Bug.pm#L1526

(In reply to Kohei Yoshino [:kohei] (Bugzilla UX) (FxSiteCompat) from comment #0)

Somehow nobody has filed or noticed this bug, but as :marco pointed out on IRC, the current /rest/bug API doesn’t return inactive custom fields like cf_status_firefox33 even if it’s set. Maybe we could add a new filter like include_fields=custom_all that returns all the fields including old ones.

https://github.com/mozilla-bteam/bmo/blob/master/Bugzilla/WebService/Bug.pm#L1526

That'd be include_fields=_custom_all, which (in the active_custom_fields hook) $wants->type->{custom_all}

Well, we need to rename active_custom_fields 😆

An example :marco mentioned is Bug 1042192, which has flags for Firefox 32, 33 and 34.

They don’t show up in https://bugzilla.mozilla.org/rest/bug?id=1042192&include_fields=_custom (search)
but they do show up in https://bugzilla.mozilla.org/rest/bug/1042192?include_fields=_custom (specific bug)

No longer blocks: 1513955
See Also: → 1508695

I can get status65 when getting info for a given bug:
curl "https://bugzilla.mozilla.org/rest/bug/1511433?include_fields=cf_status_firefox68&include_fields=cf_status_firefox65"
=> {"bugs":[{"cf_status_firefox68":"fixed","cf_status_firefox65":"affected"}],"faults":[]}

but when searching, the result is different:
curl "https://bugzilla.mozilla.org/rest/bug?bug_id=1511433&include_fields=cf_status_firefox68&include_fields=cf_status_firefox65"
=> {"bugs":[{"cf_status_firefox68":"fixed"}]}

but in adding id:
curl "https://bugzilla.mozilla.org/rest/bug/1511433?include_fields=cf_status_firefox68&include_fields=cf_status_firefox65&include_fields=id"
{"bugs":[{"cf_status_firefox68":"fixed","cf_status_firefox65":"affected","id":1511433}],"faults":[]}

my failing query is (status65 is missing):
curl "https://bugzilla.mozilla.org/rest/bug?f1=status_whiteboard&product=Core&product=DevTools&product=External+Software+Affecting+Firefox&product=Firefox&product=Firefox+for+Android&product=Firefox+Build+System&product=Testing&product=Toolkit&product=WebExtensions&bug_id=1511433&v1=%5Bno-nag%5D&include_fields=cf_status_firefox68&include_fields=cf_status_firefox65&include_fields=id&include_fields=summary&include_fields=groups&o1=notsubstring"
=> {"bugs":[{"cf_status_firefox68":"fixed","summary":"Artifacts and flickering when rendering gradients on webrender on android","groups":[],"id":1511433}]}

this is very weird...

Yeah, weird enough, I cannot reproduce the issue locally. Both a specific bug and bug search return the same results, rather including all the inactive tracking flags by default. I guess it’s a caching issue still handled in Bug 1508695.

Status: NEW → RESOLVED
Last Resolved: a month ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1508695
You need to log in before you can comment on or make changes to this bug.