Bug 31526 - Diff view on manage staged imports page is broken
Summary: Diff view on manage staged imports page is broken
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Martin Renvoize
QA Contact: Marcel de Rooy
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-09-07 09:16 UTC by Katrin Fischer
Modified: 2023-06-08 22:26 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 31526: Follow-up for bug 29697 (1.17 KB, patch)
2022-09-13 10:13 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 31526: Follow-up for bug 29697 (1.22 KB, patch)
2022-09-13 11:16 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 31526: Follow-up for bug 29697 (1.31 KB, patch)
2022-09-16 09:26 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2022-09-07 09:16:08 UTC
After importing a record that matched with an existing record, the Diff link is visible in the table of imported records. Clicking on it gives an error:

Not a CODE reference at /kohadevbox/koha/tools/showdiffmarc.pl line 65

    in (eval) at /kohadevbox/koha/tools/showdiffmarc.pl line 65

       62: 
       63: if ( $type eq 'biblio' ) {
       64:     my $biblio = Koha::Biblios->find( $recordid );
       65:     $record = $biblio->metadata->record->({ embed_items => 1 });
       66:     $recordTitle = $biblio->title;
       67: }
       68: elsif ( $type eq 'auth' ) {
Comment 1 Katrin Fischer 2022-09-07 09:17:45 UTC
To test:

* Export a record with ISBN from your catalog (Save as MARC)
* Stage it using the ISBN matching rule (make sure it matched)
* Manage staged import and click on the Diff link
Comment 2 Martin Renvoize 2022-09-13 10:13:11 UTC
Created attachment 140561 [details] [review]
Bug 31526: Follow-up for bug 29697

There was a typo in bug 29697 which lead to a code reference error.

Test plan
1) Export a record with ISBN from your catalog (Save as MARC)
2) Stage it using the ISBN matching rule (make sure it matched)
3) Manage staged import and click on the Diff link

Prior to this patch an error would be thrown, after the patch you should
now get the diff view as expected again.
Comment 3 Owen Leonard 2022-09-13 11:16:35 UTC
Created attachment 140565 [details] [review]
Bug 31526: Follow-up for bug 29697

There was a typo in bug 29697 which lead to a code reference error.

Test plan
1) Export a record with ISBN from your catalog (Save as MARC)
2) Stage it using the ISBN matching rule (make sure it matched)
3) Manage staged import and click on the Diff link

Prior to this patch an error would be thrown, after the patch you should
now get the diff view as expected again.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Marcel de Rooy 2022-09-16 09:26:47 UTC
Created attachment 140696 [details] [review]
Bug 31526: Follow-up for bug 29697

There was a typo in bug 29697 which lead to a code reference error.

Test plan
1) Export a record with ISBN from your catalog (Save as MARC)
2) Stage it using the ISBN matching rule (make sure it matched)
3) Manage staged import and click on the Diff link

Prior to this patch an error would be thrown, after the patch you should
now get the diff view as expected again.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Marcel de Rooy 2022-09-16 09:28:15 UTC
This kind of fixes should not stay too long in NSO or SO. I would even have recommended to move it to PQA directly, Martin. The RM will still see it.
Anyway thanks for the fix.
Comment 6 Tomás Cohen Arazi 2022-09-16 13:34:50 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!