Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.43k stars 2.78k forks source link

When using API to get all orders for a thirdparty, the linkedObjectsIds field in each order is null, but get order by id will reveal linkedObjectsIds data #26823

Open JonBendtsen opened 11 months ago

JonBendtsen commented 11 months ago

Bug

When using API to get all orders for a thirdparty, the linkedObjectsIds field in each order is null, but get order by id will reveal linkedObjectsIds data

Environment Version

18.0.3

Environment OS

tuxgasy container 18.0.3

Environment Web server

tuxgasy container 18.0.3

Environment PHP

PHP 8.1.20 (cli) (built: Jun 13 2023 12:02:18) (NTS)

Environment Database

1:11.0.3+maria~ubu2204

Environment URL(s)

/api/index.php/orders vs. /api/index.php/orders/1234567890

Expected and actual behavior

Expected behaviour: I would get all data in a json Actual behaviour: if I ask for all orders, I don't get any linkedObjectsIds data, so I have to redownload all the data for a specific order_id

Steps to reproduce the behavior

create thirdparty, create proposal, create order from proposal, create invoice from order.

use API url /api/index.php/orders?sortfield=t.rowid&sortorder=ASC&limit=100&thirdparty_ids=135

compare to /api/index.php/orders/303?contact_list=1

Attached files

No response

Elikill58 commented 3 months ago

This also appear for invoices (in 18.0.5 in my case)