Bugzilla – Attachment 136778 Details for
Bug 30918
Non-public note is visible in OPAC in Title Notes tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30918: Allow passing filtered record to get_marc_notes
Bug-30918-Allow-passing-filtered-record-to-getmarc.patch (text/plain), 2.13 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-06-30 14:02:40 UTC
(
hide
)
Description:
Bug 30918: Allow passing filtered record to get_marc_notes
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-06-30 14:02:40 UTC
Size:
2.13 KB
patch
obsolete
>From fc9c687f963525fa0c86666eb39a2a25f75c1577 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 7 Jun 2022 13:45:14 +0100 >Subject: [PATCH] Bug 30918: Allow passing filtered record to get_marc_notes > >This patch does the absolute bare minimum to prevent private notes from >appearing on the OPAC. > >Test plan >1. Go to Koha Administration -> Koha bibliographic frameworks >2. View the MARC structure for your BKS framework (or something else) >3. Search for tag 583, edit subfields >4. Go to subfield 'x' - nonpublic note. Confirm the OPAC visibility > checkbox is UNCHECKED. >5. Edit or create a record using the BKS framework. Put a note in the > 583$x. >6. View this record in the OPAC >7. Go to the Title notes tab. Confirm the non-public note is > showing, even though the framework says it should not be > visible via the OPAC. >8. Apply patch >9. Confirm the non-public note is no longer visible > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Biblio.pm | 2 +- > opac/opac-detail.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index ea0c9d9f84..4f77b5c914 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -949,7 +949,7 @@ sub get_marc_notes { > > my %hiddenlist = map { $_ => 1 } > split( /,/, C4::Context->preference('NotesToHide')); >- my $record = $self->metadata->record; >+ my $record = $params->{record} // $self->metadata->record; > $record = transformMARCXML4XSLT( $self->biblionumber, $record, $opac ); > > foreach my $field ( $record->field($scope) ) { >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 7219eef18e..acd20e6308 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -799,7 +799,7 @@ if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) { > } > } > >-my $marcnotesarray = $biblio->get_marc_notes({ opac => 1 }); >+my $marcnotesarray = $biblio->get_marc_notes({ opac => 1, record => $record }); > > if( C4::Context->preference('ArticleRequests') ) { > my $patron = $borrowernumber ? Koha::Patrons->find($borrowernumber) : undef; >-- >2.34.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 30918
:
135761
|
135772
| 136778