From 438e762cf142d749b6b470a91d539775a93497f2 Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Tue, 21 Nov 2023 13:46:33 +0100
Subject: [PATCH] Bug 35335: Fix 500 on circulation history

Koha::Patron->issuer is not covered by tests!

Test plan:
1. Set RecordStaffUserOnCheckout to "record"
2. Check an item out and in to a patron
3. Go to their circulation history
=> Without the patch you get an error
=> With this patch applied the table displayed correct. The "checkout by" column contains the name and the link to the librarian

Signed-off-by: David Nind <david@davidnind.com>
---
 koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
index b45cf35308..0474968527 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
@@ -119,7 +119,7 @@
                             <td>[% Branches.GetName( checkout.branchcode ) | html %]</td>
                             [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
                                 [% SET issuer = checkout.issuer %]
-                                <td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% issuer.issuer_id | uri %]">[% issuer.firstname | html %] [% issuer.surname | html %]</a></td>
+                                <td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% issuer.borrowernumber | uri %]">[% issuer.firstname | html %] [% issuer.surname | html %]</a></td>
                             [% END %]
                             <td data-order="[% checkout.date_due | html %]">
                                 [% checkout.date_due | $KohaDates as_due_date => 1 %]
-- 
2.30.2