From 183d1cf211efc91e537eff542b13d83a54ae9714 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 1 Apr 2026 18:56:02 +0000 Subject: [PATCH] Bug 42245: Prevent preselecting sort values for guarantor search av-build-dropbox.inc takes a 'default' param When building the patron we are setting this to the value of sort1, then sort2 This seems to remain cached, and when we build the guarantor search the sort2 value is used as the default This patch ensures we pass a blank default to the modal To recreate: 1 - Define 2 values for 'BSort1' in Administration -> Authorised values 2 - Define 2 values for 'BSort2' in Administration -> Authorised values 3 - Find a borrower who is eligible to have a guarantor 4 - Edit patron and assign values to sort 1 and 2 for this borrower and save 5 - Edit patron again and click 'Add guarantor' 6 - Note that sort 2 is populated 7 - Apply patch 8 - Reload borrower 9 - Confirm sort1 and 2 are empty Signed-off-by: David Nind Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index a979c9c1f9..0a449ccea7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -78,12 +78,12 @@ [% CASE 'sort1' %]
  • - [% PROCESS 'av-build-dropbox.inc' no_id => 1, name="sort1_filter", category="Bsort1", empty=1, size = 20 %] + [% PROCESS 'av-build-dropbox.inc' no_id => 1, name="sort1_filter", default="", category="Bsort1", empty=1, size = 20 %]
  • [% CASE 'sort2' %]
  • - [% PROCESS 'av-build-dropbox.inc' no_id => 1, name="sort2_filter", category="Bsort2", empty=1, size = 20 %] + [% PROCESS 'av-build-dropbox.inc' no_id => 1, name="sort2_filter", default="", category="Bsort2", empty=1, size = 20 %]
  • [% CASE 'search_field' %]
  • [% INCLUDE patron_fields_dropdown %]