Bugzilla – Attachment 139014 Details for
Bug 30966
Record overlay rules - can't use Z39.50 filter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Record Overlay Rules - can't use Z39.50 filter
0001-Bug-30966-Record-Overlay-Rules-can-t-use-Z39.50-filt.patch (text/plain), 2.35 KB, created by
Johanna Räisä
on 2022-08-11 06:26:08 UTC
(
hide
)
Description:
Record Overlay Rules - can't use Z39.50 filter
Filename:
MIME Type:
Creator:
Johanna Räisä
Created:
2022-08-11 06:26:08 UTC
Size:
2.35 KB
patch
obsolete
>From bb9b75e9820219030fde1a89ddffc23941b09d56 Mon Sep 17 00:00:00 2001 >From: Johanna Raisa <johanna.raisa@gmail.com> >Date: Fri, 29 Jul 2022 08:37:50 +0300 >Subject: [PATCH] Bug 30966: Record Overlay Rules - can't use Z39.50 filter > >This patch fixes overlay rules on z39.50 import > >Test plan: >1) Create protection overlay rule to some fields for z39.50. >2) Import a record via z39.50. >3) See that the protected fields are replaced on the editor. >4) Apply the patch. >5) Import a record again. >6) See that the protected fields are in place on the editor. > >Sponsored-by: Koha-Suomi Oy >--- > cataloguing/addbiblio.pl | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index 92abe81082..3cefa64277 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -35,6 +35,7 @@ use C4::Biblio qw( > prepare_host_field > PrepHostMarcField > TransformHtmlToMarc >+ ApplyMarcOverlayRules > ); > use C4::Search qw( FindDuplicate enabled_staff_search_views ); > use C4::Auth qw( get_template_and_user haspermission ); >@@ -846,6 +847,20 @@ if ($biblionumber) { > my $sth = $dbh->prepare("select biblioitemnumber from biblioitems where biblionumber=?"); > $sth->execute($biblionumber); > ($biblioitemnumber) = $sth->fetchrow; >+ if (C4::Context->preference('MARCOverlayRules')) { >+ my $member = Koha::Patrons->find($loggedinuser); >+ $record = ApplyMarcOverlayRules( >+ { >+ biblionumber => $biblionumber, >+ record => $record, >+ overlay_context => { >+ source => $z3950 ? 'z3950' : 'intranet', >+ categorycode => $member->categorycode, >+ userid => $member->userid >+ } >+ } >+ ); >+ } > } > > #------------------------------------------------------------------------------------- >@@ -874,7 +889,7 @@ if ( $op eq "addbiblio" ) { > $frameworkcode, > { > overlay_context => { >- source => $z3950 ? 'z39.50' : 'intranet', >+ source => $z3950 ? 'z3950' : 'intranet', > categorycode => $member->categorycode, > userid => $member->userid > } >-- >2.25.1 >
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 30966
:
138248
|
139014
|
140004
|
148375