Revert "Bug 36025: Incorrect clause in patron search"

This reverts commit 79085c4723.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Katrin Fischer 2025-01-07 14:47:02 +00:00
parent e1a8dc875f
commit 7d2f41adee
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
3 changed files with 3 additions and 6 deletions

View File

@ -33,10 +33,7 @@ sub all {
sub codes {
my ( $self, $params ) = @_;
my @codes = Koha::Patron::Attribute::Types->search($params)->get_column('code');
return \@codes;
return Koha::Patron::Attribute::Types->search($params)->get_column('code');
}
1;

View File

@ -280,7 +280,7 @@
}, {});
[% IF Koha.Preference('ExtendedPatronAttributes') %]
[% SET extended_attribute_types = ExtendedAttributeTypes.codes( staff_searchable => 1, searched_by_default => 1 ) %]
[% SET extended_attribute_types = [ ExtendedAttributeTypes.codes( staff_searchable => 1, searched_by_default => 1 ) ] %]
var extended_attribute_types = [% To.json(extended_attribute_types || []) | $raw %];
[% END %]

View File

@ -860,7 +860,7 @@ function buildPatronSearchQuery(term, options) {
if (
typeof options !== "undefined" &&
((options.search_fields == "standard" &&
options.extended_attribute_types.length > 0) ||
options.extended_attribute_types) ||
searched_attribute_fields.length > 0) &&
extendedPatronAttributes
) {