From 1820747a4a7ee9ab828e851e7b3e8fb77105d03d Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 3 Oct 2022 17:07:20 +0100 Subject: [PATCH] Bug 30979: 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. --- C4/Circulation.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9ff0b1f5d4..1b529ecd2e 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1535,6 +1535,7 @@ sub AddIssue { $datedue, $issuedate, # here interpreted as the renewal date ); + $issue = Koha::Checkouts->find( { itemnumber => $item_object->itemnumber } ); } else { unless ($datedue) { -- 2.20.1