From 5b221941f9fae5e99211d1ebae6f37a1e4b8ec4d Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 28 Mar 2023 11:15:11 +1300 Subject: [PATCH] Bug 33347: Fix MARC preview when applying modification template A previous fix to use $biblio->metadata->record accidentally broke the MARC preview when applying a MARC modification template. This patch makes sure the record is correctly fetched. To test: 1. Create a simple MARC modification template and action (tool now found under Cataloguing) 2. Go to Batch record modification 3. Enter a biblionumber and select your template 4. Click the Show MARC button to preview your changes 5. Notice there is an error in the plack log and the preview never loads 6. Apply the patch and refresh the page 7. Click the Show MARC button to preview your changes 8. Confirm the MARC preview successfully loads Sponsored-by: Education Services Australia SCIS --- svc/records/preview | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svc/records/preview b/svc/records/preview index 9e528e43786..81431f160f9 100755 --- a/svc/records/preview +++ b/svc/records/preview @@ -36,7 +36,7 @@ my $mmtid = $query->param('mmtid'); # Marc modification template id my $record; if ( $record_type eq 'biblio' ) { my $biblio = Koha::Biblios->find( $record_id ); - my $record = $biblio->metadata->record; + $record = $biblio->metadata->record; } else { my $authority = Koha::MetadataRecord::Authority->get_from_authid( $record_id ); $record = $authority->record; -- 2.30.2