From d95de3d3c348a221452865def72ea8ef29c949e3 Mon Sep 17 00:00:00 2001 From: Jan Kissig Date: Fri, 12 Jun 2026 07:47:59 +0000 Subject: [PATCH] Bug 40201: Add addidtional fields to subscription search on serials home This patch adds additional fields (table subscription, searchable) to the subscription search form on serials home. To test (ktd): a) create some additional fields in Admin -> Additional fields -> Serials subscriptions. Make sure the 'Searchable' checkbox is checked. b) go to serials home: More -> Serials c) Check that the form is missing the additional fields just defined. d) apply patch and call restart_all e) reload serials home and check that the search form is now extended with the additional fields Signed-off-by: Michaela Sieber Signed-off-by: Jonathan Druart Signed-off-by: Lucas Gass --- serials/serials-home.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/serials/serials-home.pl b/serials/serials-home.pl index 6d8bbc848f..2e4ba91c9e 100755 --- a/serials/serials-home.pl +++ b/serials/serials-home.pl @@ -33,9 +33,11 @@ use C4::Auth qw( get_template_and_user ); use C4::Context; use C4::Output qw( output_html_with_http_headers ); use C4::Serials; +use Koha::AdditionalFields; -my $query = CGI->new; -my $routing = $query->param('routing') || C4::Context->preference("RoutingSerials"); +my $query = CGI->new; +my $routing = $query->param('routing') || C4::Context->preference("RoutingSerials"); +my @additional_fields = Koha::AdditionalFields->search( { tablename => 'subscription', searchable => 1 } )->as_list; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { @@ -48,6 +50,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( $template->param( routing => $routing, + additional_fields_for_subscription => \@additional_fields, ( uc( C4::Context->preference("marcflavour") ) ) => 1 );