From 3a672758c88ec64ca9ce78efe2ad394dec798289 Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Wed, 29 Apr 2026 14:49:45 +0300 Subject: [PATCH] Bug 28915: Fix field_exists call in C4::MarcModificationTemplates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Control fields (generally, just tags below 010) do not have subfields, use data() at /home/koha/Koha/Koha/SimpleMARC.pm line 460. To test: 1. prove t/db_dependent/MarcModificationTemplates.t 2. Observe success Signed-off-by: Anneli Österman Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim --- C4/MarcModificationTemplates.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/MarcModificationTemplates.pm b/C4/MarcModificationTemplates.pm index f36a81b7fb..0511f43564 100644 --- a/C4/MarcModificationTemplates.pm +++ b/C4/MarcModificationTemplates.pm @@ -640,7 +640,7 @@ sub ModifyRecordWithTemplate { { record => $record, field => $from_field, - subfield => $from_subfield, + subfield => $from_field < 10 ? undef : $from_subfield, } ); }