From 58bac47acb42c6c7620fe17424b68b134f425ec8 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Sun, 8 Oct 2023 22:57:29 -1000 Subject: [PATCH] Bug 35010: In record checkout history do not show anonymous patron link In a biblio record checkout history, when a checkout is anonymized the patron id has been replaced by anonymous patron id. In this case we should not show anonymous patron link. It looks like a real patron did this checkout. Test plan : 1) Set an existing patron id in system preference 'AnonymousPatron' 2) Perform anonymisation on old checkouts (or edit database manually) 3) Look at a record checkout history with old checkouts => You see 'Anonymized' for anonymized checkouts 4) Set system preference 'AnonymousPatron' empty 5) Look at same record checkout history => Check no error --- .../prog/en/modules/catalogue/issuehistory.tt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt index 37c03921eb..3c85ffcbcd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt @@ -67,12 +67,17 @@ Checkin on + [% SET anonymous_patron_id = Koha.Preference('AnonymousPatron') || 0 %] [% FOREACH checkout IN checkouts %] [% IF show_patron_column %] [% IF checkout.patron %][%# Not set for deleted patron records %] - [% INCLUDE 'patron-title.inc' patron => checkout.patron hide_patron_infos_if_needed=1 %] + [% IF checkout.patron.id == anonymous_patron_id %] + Anonymized + [% ELSE %] + [% INCLUDE 'patron-title.inc' patron => checkout.patron hide_patron_infos_if_needed=1 %] + [% END %] [% END %] [% END %] -- 2.42.0