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>
(cherry picked from commit 0efae9ed05
)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
4edaa27fc2
commit
2ad8c15dbf
2 changed files with 2 additions and 2 deletions
|
@ -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) ) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue