Bug 2101541 - Webservice / REST - extra_fields / include_fields returning empty when there are values
Summary: Webservice / REST - extra_fields / include_fields returning empty when there ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Bugzilla
Classification: Community
Component: WebService
Version: 5.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Bug Bot 🤖
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-27 18:29 UTC by Brad Maxwell
Modified: 2022-06-29 14:38 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-29 14:38:11 UTC
Embargoed:


Attachments (Terms of Use)

Description Brad Maxwell 2022-06-27 18:29:26 UTC
Description of problem:

Webservice / REST - extra_fields / include_fields returning empty when there are values

[2] returns empty for external_bugs and flags [3] has an external bug and flags which are not being returned

[1] https://bugzilla.redhat.com/docs/en/html/integrating/api/Bugzilla/WebService/Bug.html#bugzilla-webservice-bug-get

[2] https://bugzilla.redhat.com/rest/bug/1740765?extra_fields=external_bugs&extra_fields=cf_partner&extra_fields=flags&extra_fields=cf_last_closed

         "external_bugs" : [],
         "flags" : [],


[3] https://bugzilla.redhat.com/show_bug.cgi?id=1740765

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. open url [2]
2. open url [3]
3. [2] external_bugs and flags are empty even though they are visible on [3]

Actual results:

fields empty when there should be a value

Expected results:

values to be returned

Additional info:

Comment 1 Jeff Fearn 🐞 2022-06-28 05:41:48 UTC
There is no public data for those fields on that bug, you will need to authenticate to get private data.

https://bugzilla.redhat.com/docs/en/html/integrating/api/Bugzilla/WebService.html#authentication

Comment 2 Brad Maxwell 2022-06-29 03:03:57 UTC
Is the WebService using different authentication than the browser? I connected to jira and did not remember seeing a difference.

Then hitting [2] in the browser, it gives authentication required.

I was able to send the token and see them now, just seemed off that I could be logged into the browser and view these, but then there being a difference when hitting the REST in the browser, though I found a way to test in the browser by adding to the header and can see the fields now.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1713539
[2] https://bugzilla.redhat.com/rest/bug/1713539?extra_fields=external_bugs&extra_fields=cf_partner&extra_fields=flags&extra_fields=cf_last_closed

Comment 3 Jeff Fearn 🐞 2022-06-29 03:06:26 UTC
(In reply to Brad Maxwell from comment #2)
> Is the WebService using different authentication than the browser?

Yes.

Comment 4 Brad Maxwell 2022-06-29 14:38:11 UTC
Thanks, that answers and explains the issue


Note You need to log in before you can comment on or make changes to this bug.