From 09677fa3a72954b45af76a2c1e0c3169f4677f56 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 Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit dad04bbf0a1915930a95bdb3fea73f47602be884) Signed-off-by: Fridolin Somers (cherry picked from commit 704ed483000912d5f9935da31e312940cb01c960) Signed-off-by: Matt Blenkinsop --- .../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 ba2c56a392..9cde3e6c38 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt @@ -61,12 +61,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.39.5