@@ -, +, @@ default fallback fields of firstname, surname, othernames, cardnumber and userid (and some extended attributes which are historically hard coded). the main page selected. request. more borrower fields in a comma delimited list. should find that only the fields in your DefaultPatronSearchFields list are searched (along with the hard coded extended attributes list). --- .../intranet-tmpl/prog/en/includes/patron-search-header.inc | 5 ++--- koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 5 ++--- koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc @@ -23,9 +23,8 @@

- [% pref_fields = Koha.Preference('DefaultPatronSearchFields').split(',') %] - [% default_fields = [ 'firstname,surname,othernames,cardnumber,userid', 'surname', 'cardnumber', 'email', 'borrowernumber', 'userid', 'phone', 'address', 'dateofbirth', 'sort1', 'sort2' ] %] - [% search_options = default_fields.merge(pref_fields).unique %] + [% SET standard = Koha.Preference('DefaultPatronSearchFields') || 'firstname,surname,othernames,cardnumber,userid' %] + [% SET search_options = [ standard, 'surname', 'cardnumber', 'email', 'borrowernumber', 'userid', 'phone', 'address', 'dateofbirth', 'sort1', 'sort2' ] %] [% FOREACH s_o IN search_options %] [% display_name = PROCESS patron_fields name=s_o %] [% NEXT IF !display_name %] --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc @@ -1,6 +1,6 @@ [%- BLOCK patron_fields -%] [%- SWITCH name -%] - [%- CASE 'firstname,surname,othernames,cardnumber,userid' -%]Standard + [%- CASE standard -%]Standard [%- CASE 'borrowernumber' -%]Borrowernumber [%- CASE 'cardnumber' -%]Card number [%- CASE 'surname' -%]Surname --