Bugzilla – Attachment 183090 Details for
Bug 39971
Patron attribute types form logic should be reusable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39971: Add query param
Bug-39971-Add-query-param.patch (text/plain), 1.47 KB, created by
David Nind
on 2025-06-07 01:20:34 UTC
(
hide
)
Description:
Bug 39971: Add query param
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-06-07 01:20:34 UTC
Size:
1.47 KB
patch
obsolete
>From 81d9bba703f503eafaf0a2f3d887072a088436d2 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Wed, 21 May 2025 13:27:37 +0000 >Subject: [PATCH] Bug 39971: Add query param > >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/Patron/Attribute/Types.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/Koha/Patron/Attribute/Types.pm b/Koha/Patron/Attribute/Types.pm >index 405e50ea20..d74b5551d4 100644 >--- a/Koha/Patron/Attribute/Types.pm >+++ b/Koha/Patron/Attribute/Types.pm >@@ -42,6 +42,7 @@ Params: > $template - The template object to be populated with patron attributes. > $attributes - Arrayref of hashrefs containing patron attribute data. > $op - Operation type, such as 'duplicate', used to handle unique attributes. >+ $query - Query to filter attributes e.g. { mandatory => 1 }. > > =cut > >@@ -49,9 +50,10 @@ sub patron_attributes_form { > my $template = shift; > my $attributes = shift; > my $op = shift; >+ my $query = shift // {}; > > my $library_id = C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; >- my $attribute_types = Koha::Patron::Attribute::Types->search_with_library_limits( {}, {}, $library_id ); >+ my $attribute_types = Koha::Patron::Attribute::Types->search_with_library_limits( $query, {}, $library_id ); > if ( $attribute_types->count == 0 ) { > $template->param( no_patron_attribute_types => 1 ); > return; >-- >2.39.5
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 39971
:
182739
|
182740
|
182741
|
182742
|
183087
|
183088
|
183089
| 183090