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

PUT method doesn't change the value of the extra fields of the shipments module #32072

Closed
denes44 opened this issue Nov 22, 2024 · 0 comments · Fixed by #32073
Closed

PUT method doesn't change the value of the extra fields of the shipments module #32072

denes44 opened this issue Nov 22, 2024 · 0 comments · Fixed by #32073
Labels
Bug This is a bug (something does not work as expected)

Comments

@denes44
Copy link
Contributor

denes44 commented Nov 22, 2024

Bug

When using the PUT /shipments/{id} method of the REST_API, the extra fields contained under array_options does not change after a successfull API call.

Dolibarr Version

20.0.2

Environment PHP

8.2.24

Environment Database

MySQL or MariaDB 10.9.8-MariaDB-1:10.9.8+maria~deb11

Steps to reproduce the behavior and expected behavior

Request body:
image

Response body:
image

If I try to update a normal field, it works:
Request body:
image

Response body:
image

If I use the PUT /products/{id} method, that also works fine:
Request body:
image

Response body:
image

It looks like the products API handle the array_options:
https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/product/class/api_products.class.php#L397

But the shipment API does not:
https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/expedition/class/api_shipments.class.php#L486

Attached files

No response

@denes44 denes44 added the Bug This is a bug (something does not work as expected) label Nov 22, 2024
denes44 added a commit to denes44/dolibarr that referenced this issue Nov 23, 2024
…ent module

Store extra field during updating the shipment object
@denes44 denes44 mentioned this issue Nov 23, 2024
eldy pushed a commit that referenced this issue Nov 26, 2024
…le (#32073)

Store extra field during updating the shipment object
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

Successfully merging a pull request may close this issue.

1 participant