From 38139718f534f308e5eb846f5e26ef54c01c3376 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 3 Oct 2022 17:07:20 +0100 Subject: [PATCH] Bug 23336: Fix inconsistent return of AddIssue AddIssue can on occasion create a renewal instead of a fresh issue and in such a case we currently return undefined. We should be consistent and return the existing issue object for the renewal. Signed-off-by: Silvia Meakins Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- C4/Circulation.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index eb754c8401..ab03362e06 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1546,6 +1546,7 @@ sub AddIssue { $datedue, $issuedate, # here interpreted as the renewal date ); + $issue = Koha::Checkouts->find( { itemnumber => $item_object->itemnumber } ); } else { -- 2.39.5