https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 Bug ID: 42972 Summary: [25.11.x] Cannot add, edit, or delete MARC overlay rules Initiative type: --- Sponsorship --- status: Product: Koha Version: 25.11 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Target Milestone: --- Works in main, not in 25.11.x. Is this the result of a bad rebase? kohadev-koha@kohadevbox:koha(25.11.x)$ git show 246f299df1ecbc41bdf15dffc01dac25a62fec2b commit 246f299df1ecbc41bdf15dffc01dac25a62fec2b Author: Jan Kissig <bibliothek@th-wildau.de> Date: Fri Mar 13 10:17:26 2026 +0000 Bug 35380: Make record sources available in overlay rules This patch enhances the filters in record overlay rules when using the "Source" module. The available filter values are now system defined in Administration -> Record sources and can be extended by own record souces. The former hard coded values (f.e. batchmod, intranet) are added to the database and cannot be deleted. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> diff --git a/admin/marc-overlay-rules.pl b/admin/marc-overlay-rules.pl index bebaa1d6aca..e472ffdaa41 100755 --- a/admin/marc-overlay-rules.pl +++ b/admin/marc-overlay-rules.pl @@ -26,6 +26,7 @@ use C4::Output qw( output_html_with_http_headers ); use C4::ImportBatch; use Koha::MarcOverlayRules; use Koha::Patron::Categories; +use Koha::RecordSources; my $input = CGI->new; my $op = $input->param('op') || ''; @@ -124,10 +125,14 @@ my $categories = Koha::Patron::Categories->search_with_library_limits( { order_by => ['description'], columns => [ 'categorycode', 'description' ] } )->unblessed; +my @record_sources = + map { $_->{name} } @{ Koha::RecordSources->search->unblessed }; + $template->param( - rules => $rules, - categories => $categories, - messages => $errors + rules => $rules, + categories => $categories, + record_sources => \@record_sources, + messages => $errors ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt index ab5bfc3a6dc..5d59b5ba6ed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt @@ -491,16 +491,21 @@ categories.unshift({ categorycode: "*", description: "*" }); categories = categories.reduce((a, c) => ({ ...a, [c.categorycode]: c.description }), {}); - var module_filter_options = { - source: { - "*": "*", - batchmod: _("Batch record modification"), - intranet: _("Staff interface MARC editor"), - batchimport: _("Staged MARC import"), - z3950: _("Z39.50"), - bulkmarcimport: _("bulkmarcimport.pl"), - import_lexile: _("import_lexile.pl"), - }, + var module_filter_options = { + source: { + '*': '*', + [% FOREACH record_source IN record_sources %] + [% SWITCH record_source %] + [% CASE 'batchmod' %]'[% record_source %]': _("Batch record modification"), + [% CASE 'intranet' %]'[% record_source %]':_("Staff interface MARC editor"), + [% CASE 'batchimport' %]'[% record_source %]': _("Staged MARC import"), + [% CASE 'z3950' %]'[% record_source %]': _("Z39.50"), + [% CASE 'bulkmarkimport' %]'[% record_source %]': _("bulkmarcimport.pl"), + [% CASE 'import_lexile' %]'[% record_source %]': _("import_lexile.pl"), + [% CASE %] '[% record_source %]' : '[% record_source | html %]', + [% END %] + [% END %] + }, categorycode: categories, }; -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.