Closed Bug 1026416 Opened 6 years ago Closed 6 years ago

"blocks" field is present as empty string when empty, rather than null or []

Categories

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

Production
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: gerv, Assigned: dkl)

Details

If a bug doesn't have any blockers, BzAPI omits the field, but Compat returns it as "".

Compare:
https://bugzilla.mozilla.org/bzapi/bug/35
https://api-dev.bugzilla.mozilla.org/latest/bug/35?content-type=application/json

If you do return a value, it should be null or [], as "blocks" is a list, even when it contains only one value.

Gerv
Oops, misfiled this...

Gerv
Component: Networking: Domain Lists → Extensions: BzAPI Compatibility
Product: Core → bugzilla.mozilla.org
Version: unspecified → Production
So after some unscientific A:B testing, we are the same with regards to bug searches (/bug?id=35) but not the same with single bug requests (/bug/35) so I will make the following change:

1. If depends_on and blocks are empty for a single bug request, then omit the key altogether.
2. If they are emtpy for bug search results, then the empty string is sent (current behavior).

dkl
Assignee: nobody → dkl
Status: NEW → ASSIGNED
QA Contact: networking.domain-lists
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   4f66979..809f753  master -> master
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Component: Extensions: BzAPI Compatibility → Extensions
You need to log in before you can comment on or make changes to this bug.