From 298b82b06ef20a34958f56e8f1da690ed582443c Mon Sep 17 00:00:00 2001 From: Laura_Escamilla Date: Mon, 9 Jun 2025 13:26:36 +0000 Subject: [PATCH] Bug 39427: Split the argument for both name fields to be searched and added regex for spacing --- C4/Utils/DataTables/VirtualShelves.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/Utils/DataTables/VirtualShelves.pm b/C4/Utils/DataTables/VirtualShelves.pm index 80f18a61da..1d4b868073 100644 --- a/C4/Utils/DataTables/VirtualShelves.pm +++ b/C4/Utils/DataTables/VirtualShelves.pm @@ -63,6 +63,8 @@ sub search { push @args, "%$shelfname%"; } if ( defined $owner and $owner ne '' ) { + $owner =~ s/^\s+|\s+$//g; # Trim leading/trailing spaces + $owner =~ s/\s+/ /g; # Collapse multiple internal spaces to one my @name_parts = split ' ', $owner; if ( @name_parts == 2 ) { -- 2.39.5