Skip to content

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

@denes44

Description

@denes44

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugThis is a bug (something does not work as expected)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions