Bugzilla – Attachment 180780 Details for
Bug 39229
Search additional unique patron properties on patron quicksearch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39229: Also handle the case when performing a patron checkout
Bug-39229-Also-handle-the-case-when-performing-a-p.patch (text/plain), 2.66 KB, created by
David Gustafsson
on 2025-04-10 13:41:33 UTC
(
hide
)
Description:
Bug 39229: Also handle the case when performing a patron checkout
Filename:
MIME Type:
Creator:
David Gustafsson
Created:
2025-04-10 13:41:33 UTC
Size:
2.66 KB
patch
obsolete
>From e63d18224d136a6b2eb23447596da1adf495db44 Mon Sep 17 00:00:00 2001 >From: David Gustafsson <david.gustafsson@ub.gu.se> >Date: Thu, 10 Apr 2025 15:38:19 +0200 >Subject: [PATCH] Bug 39229: Also handle the case when performing a patron > checkout > >--- > members/member.pl | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > >diff --git a/members/member.pl b/members/member.pl >index f93d787ad39..df06ecb2508 100755 >--- a/members/member.pl >+++ b/members/member.pl >@@ -46,7 +46,7 @@ my $searchmember = $input->param('searchmember'); > my $quicksearch = $input->param('quicksearch') // 0; > my $circsearch = $input->param('circsearch') // 0; > >-if ( $quicksearch and $searchmember && !$circsearch ) { >+if ( $quicksearch and $searchmember ) { > my $branchcode; > if (C4::Context::only_my_library) { > my $userenv = C4::Context->userenv; >@@ -60,7 +60,9 @@ if ( $quicksearch and $searchmember && !$circsearch ) { > or ( not $branchcode ) ) > ) > { >- print $input->redirect( "/cgi-bin/koha/members/moremember.pl?borrowernumber=" . $patron->borrowernumber ); >+ my $redirect_url = >+ $circsearch ? '/cgi-bin/koha/circ/circulation.pl' : '/cgi-bin/koha/members/moremember.pl'; >+ print $input->redirect( "$redirect_url?borrowernumber=" . $patron->borrowernumber ); > exit; > } > }; >@@ -72,8 +74,10 @@ if ( $quicksearch and $searchmember && !$circsearch ) { > $maybe_redirect->($patron) if ($patron); > > if ( C4::Context->preference('UniqueExtendedAttributesQuickSearch') ) { >+ > # Search all unique patron attributes >- my @unique_types = Koha::Patron::Attribute::Types->search( { 'unique_id' => 1, 'staff_searchable' => 1, 'searched_by_default' => 1 } )->as_list; >+ my @unique_types = Koha::Patron::Attribute::Types->search( >+ { 'unique_id' => 1, 'staff_searchable' => 1, 'searched_by_default' => 1 } )->as_list; > my @attribute_conditions; > for my $type (@unique_types) { > push @attribute_conditions, [ >@@ -85,7 +89,8 @@ if ( $quicksearch and $searchmember && !$circsearch ) { > } > > if (@attribute_conditions) { >- my @patrons = Koha::Patrons->search( \@attribute_conditions, { prefetch => ['extended_attributes'] } )->as_list; >+ my @patrons = >+ Koha::Patrons->search( \@attribute_conditions, { prefetch => ['extended_attributes'] } )->as_list; > > # The only case where could be more than one is when multiple unique attribute has the same value for different patrons > # which should be unlikely. If that is the case we should perform a full search. >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39229
:
178892
|
178932
|
178970
|
178971
|
178972
|
178973
|
178974
|
178975
|
178995
|
178996
|
178997
| 180780