From 17026d9dd4853b26ac17bc0e61f6fcc4f4692c51 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Mon, 5 Aug 2024 15:24:51 +0200 Subject: [PATCH] Bug 37569: Fix the way serials are returned Serials cannot be edited if there is no history associated to the serial. Fetching a subscription matching a given serialnumber results in an hashref containing two fields named serial number. One of them is undef and is used by the form and is therefore not submitted at the end. This is not supposed to happen since creating an exemplary automatically creates a new exemplary, but if serials are created through DB, they are not editable. Test plan: 1 - Create a serial 2 - In the database remove there history associated with the serial 3 - Try and edit serial, at the end of the form, it will result in "serial not found" 4 - Apply patch 5 - Redo 3 and notice it now works Signed-off-by: David Nind --- C4/Serials.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 918f84d6bb..377f71dcb0 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -276,7 +276,8 @@ sub GetSubscription { aqbooksellers.name AS aqbooksellername, biblio.title AS bibliotitle, biblio.subtitle AS bibliosubtitle, - subscription.biblionumber as bibnum + subscription.biblionumber as bibnum, + subscription.subscriptionid as subscriptionid FROM subscription LEFT JOIN subscriptionhistory ON subscription.subscriptionid=subscriptionhistory.subscriptionid LEFT JOIN aqbooksellers ON subscription.aqbooksellerid=aqbooksellers.id -- 2.39.5