[Bug 42972] New: [25.11.x] Cannot add, edit, or delete MARC overlay rules
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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 --- Comment #1 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 201388 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201388&action=edit Bug 42972: [25.11.x] Fix broken JavaScript in marc-overlay-rules.tt To test: 0. Checkout 25.11.x 1. Enable MARCOverlayRules 2. Go to Admin -> Record overlay rules 3. Try to add, edit, delete a rule. You will get an error. Also notice the JS error in the console 4. Apply patch and try again 5. This time everything should work, try adding, editing, and deleting a rule. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jacob.omara@openfifth.co.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |35380 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 [Bug 35380] PUT /biblios/:biblio_id doesn't apply record overlay rules -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 Eric Phetteplace <ephetteplace@cca.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201388|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 --- Comment #2 from Eric Phetteplace <ephetteplace@cca.edu> --- Created attachment 201407 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201407&action=edit Bug 42972: [25.11.x] Fix broken JavaScript in marc-overlay-rules.tt To test: 0. Checkout 25.11.x 1. Enable MARCOverlayRules 2. Go to Admin -> Record overlay rules 3. Try to add, edit, delete a rule. You will get an error. Also notice the JS error in the console 4. Apply patch and try again 5. This time everything should work, try adding, editing, and deleting a rule. Signed-off-by: Eric Phetteplace <phette23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 Eric Phetteplace <ephetteplace@cca.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ephetteplace@cca.edu Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201407|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 201408 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201408&action=edit Bug 42972: [25.11.x] Fix broken JavaScript in marc-overlay-rules.tt To test: 0. Checkout 25.11.x 1. Enable MARCOverlayRules 2. Go to Admin -> Record overlay rules 3. Try to add, edit, delete a rule. You will get an error. Also notice the JS error in the console 4. Apply patch and try again 5. This time everything should work, try adding, editing, and deleting a rule. Signed-off-by: Eric Phetteplace <phette23@gmail.com> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- Added my sign off as well 8-) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |aleisha@catalyst.net.nz |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201408|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 --- Comment #5 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 201622 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201622&action=edit Bug 42972: [25.11.x] Fix broken JavaScript in marc-overlay-rules.tt To test: 0. Checkout 25.11.x 1. Enable MARCOverlayRules 2. Go to Admin -> Record overlay rules 3. Try to add, edit, delete a rule. You will get an error. Also notice the JS error in the console 4. Apply patch and try again 5. This time everything should work, try adding, editing, and deleting a rule. Signed-off-by: Eric Phetteplace <phette23@gmail.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_25_11_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.06 released in| | CC| |baptiste.wojtkowski@biblibr | |e.com --- Comment #6 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Pushed into 25.11.x for 25.11.06 nice work everyone -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.06 |25.11.07 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_25_11_candidate | Status|Passed QA |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Bugfix, so nothing to document. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 Bug 42972 depends on bug 35380, which changed state. Bug 35380 Summary: PUT /biblios/:biblio_id doesn't apply record overlay rules https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org