From 08a2e0475b330e4459198f96a3876c458d14fd98 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 18 Aug 2026 16:57:38 +0100 Subject: [PATCH] Bug 30144: (QA follow-up) Exclude servicing_instruction from order API representation The servicing_instruction column was not mapped in Koha::Acquisition::Order->to_api_mapping, so it was exposed verbatim in the REST API order representation. Since api/v1/swagger/definitions/order.yaml does not declare this property and sets additionalProperties: false, any request touching the acquisitions/orders endpoint (e.g. the "Receive shipments" page) failed with a 500 error: "Properties not allowed: servicing_instruction". Exclude it from the API representation, consistent with the other EDIFACT-only columns (line_item_id, suppliers_reference_number, etc.) that are already excluded the same way. Test plan: 1) Go to a vendor page, create a basket, add an order line, and close the basket. 2) From the vendor page, click "Receive shipments". 3) Without this patch, the orders table fails to load with a 500 error mentioning "Properties not allowed: servicing_instruction". 4) With this patch applied, the orders table loads correctly. 5) prove t/db_dependent/api/v1/acquisitions_orders.t Signed-off-by: Pedro Amorim --- Koha/Acquisition/Order.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Koha/Acquisition/Order.pm b/Koha/Acquisition/Order.pm index 99c4ade540..53295b621b 100644 --- a/Koha/Acquisition/Order.pm +++ b/Koha/Acquisition/Order.pm @@ -654,6 +654,7 @@ sub to_api_mapping { parent_ordernumber => 'parent_order_id', quantityreceived => 'quantity_received', replacementprice => 'replacement_price', + servicing_instruction => undef, # EDIFACT related sort1 => 'statistics_1', sort1_authcat => 'statistics_1_authcat', sort2 => 'statistics_2',