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 commit0efae9ed05) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> (cherry picked from commit2ad8c15dbf) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This commit is contained in:
parent
b10ac8189f
commit
f5b7ad6ef3
|
|
@ -940,7 +940,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) ) {
|
||||
|
|
|
|||
|
|
@ -787,7 +787,7 @@ if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) {
|
|||
}
|
||||
}
|
||||
|
||||
my $marcnotesarray = $biblio->get_marc_notes({ marcflavour => $marcflavour, opac => 1 });
|
||||
my $marcnotesarray = $biblio->get_marc_notes({ marcflavour => $marcflavour, opac => 1, record => $record });
|
||||
|
||||
if( C4::Context->preference('ArticleRequests') ) {
|
||||
my $patron = $borrowernumber ? Koha::Patrons->find($borrowernumber) : undef;
|
||||
|
|
|
|||
Loading…
Reference in New Issue