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 <michaela.sieber@kit.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jan Kissig 2026-06-12 07:47:59 +00:00 committed by Lucas Gass
parent 17d3a9ca1c
commit d95de3d3c3
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 5 additions and 2 deletions

View File

@ -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
);