Bugzilla – Attachment 151121 Details for
Bug 33335
MARC overlay rules broken because of "categorycode.categorycode " which contains "-"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33335: (QA follow-up) Polishing and comments
Bug-33335-QA-follow-up-Polishing-and-comments.patch (text/plain), 1.90 KB, created by
Marcel de Rooy
on 2023-05-12 08:38:57 UTC
(
hide
)
Description:
Bug 33335: (QA follow-up) Polishing and comments
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-05-12 08:38:57 UTC
Size:
1.90 KB
patch
obsolete
>From 56f60e6ecb612e668f4d898dbb876e2187e515b1 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 12 May 2023 08:33:32 +0000 >Subject: [PATCH] Bug 33335: (QA follow-up) Polishing and comments >Content-Type: text/plain; charset=utf-8 > >Just send the codes and descriptions only to client. >Adding a few comments to the reduce construction. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > admin/marc-overlay-rules.pl | 2 +- > .../intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) > >diff --git a/admin/marc-overlay-rules.pl b/admin/marc-overlay-rules.pl >index b3e0a86f8d..6c737b49a7 100755 >--- a/admin/marc-overlay-rules.pl >+++ b/admin/marc-overlay-rules.pl >@@ -133,7 +133,7 @@ elsif ($op eq 'doedit' || $op eq 'add') { > } > > my $categories = Koha::Patron::Categories->search_with_library_limits( {}, >- { order_by => ['description'] } )->unblessed; >+ { order_by => ['description'], columns => [ 'categorycode', 'description' ] } )->unblessed; > > $template->param( > rules => $rules, >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 fbdc3813ad..fd96291086 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 >@@ -456,6 +456,8 @@ > }); > > var categories = [% To.json( categories ) | $raw %]; >+ // Add * => * to this array of objects, and *reduce* it to one object >+ // Note: This allows displaying a sorted list of categories later, but we still depend on an object! > categories.unshift({ categorycode: '*', description: '*'}); > categories = categories.reduce( ( a,c ) => ( { ...a, [c.categorycode]: c.description } ), {} ); > >-- >2.30.2
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 33335
:
148696
|
148841
|
149253
|
150521
|
151116
|
151119
|
151120
| 151121