Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST API supplier categories does not return all #11942

Closed
Heuser98 opened this issue Sep 21, 2019 · 1 comment
Closed

REST API supplier categories does not return all #11942

Heuser98 opened this issue Sep 21, 2019 · 1 comment
Labels
Bug This is a bug (something does not work as expected)

Comments

@Heuser98
Copy link

Heuser98 commented Sep 21, 2019

#10778 Bug
In the REST API test section for retrieving categories of suppliers
https://xxx.xx/api/index.php/explorer/#!/thirdparties/thirdpartiesRetrieveSupplierCategories
you can see, that the API reteurns one category with the ID "2" in our example for the supplier with ID "74531". See attached scrennshot1.
Looking up the table "categorie_fournisseur" in the database of this installation you see, that the supplier with ID "74531" has 4 entries with the category IDs 2, 3, 6, 7. See attached scrennshot2.
According to table "categorie_fournisseur" in the database of this installation supplier "74375" has one category with ID "9". See attached screenshot2.
The REST API answer for this supplier is empty. See screenshot3.
The REST API answer for supplier 74349 is also empty. See screenshot4.

That shows, that the REST API ony returns the first row in table "categorie_fournisseur". All following rows are lost in the REST API answer.

Environment

Expected and actual behavior

The REST API answer should deliver all the categories of a supplier according to table "categorie_fournisseur" in the database. But it only delivers the categorie of the first row in table "categorie_fournisseur". All the other rows / categories of table "categorie_fournisseur" are ignored.

Steps to reproduce the behavior

Attached files (Screenshots, screencasts, dolibarr.log, debugging informations…)

Bildschirmfoto 2019-09-21 um 22 58 41

Bildschirmfoto 2019-09-21 um 23 10 33

@Heuser98 Heuser98 added the Bug This is a bug (something does not work as expected) label Sep 21, 2019
@Heuser98
Copy link
Author

correction :

delete screenshots 3 and 4 in the previous post and use the new screenshots 5 and 6 attached here.

correction of actual behavior:

The API only delivers the first category of a third party listed in table "categorie_fournisseur". All the other categories listed for this user are ignored.

##New Atachements:

Bildschirmfoto 2019-09-22 um 15 26 10

Bildschirmfoto 2019-09-22 um 15 37 12

@eldy eldy closed this as completed in 760783b Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

1 participant