Bug 21579

Summary: showdiffmarc tool during manage staged batches always looks for biblios even when matching authorities
Product: Koha Reporter: Nick Clemens <nick>
Component: ToolsAssignee: Nick Clemens <nick>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, hector.hecaxmmx, jonathan.druart, katrin.fischer, m.de.rooy, marjorie.barry-vila, martin.renvoize, sandboxes, tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Who signed the patch off: Text to go in the release notes:
Version(s) released in:
Attachments: Bug 21579: Make showdiffmarc.pl work for authorities and biblios
Bug 21579: Make showdiffmarc.pl work for authorities and biblios
Bug 21579: Make showdiffmarc.pl work for authorities and biblios
Bug 21579: Make showdiffmarc.pl work for authorities and biblios

Description Nick Clemens 2018-10-16 14:00:54 UTC
The code in general here doesn't seem to know about authorities
Comment 1 Nick Clemens 2018-10-16 14:03:28 UTC
Created attachment 80654 [details] [review]
Bug 21579: Make showdiffmarc.pl work for authorities and biblios

To test:
 1 - Have or make some authority records
 2 - Have or make an authority matching rule
 3 - Export your authrotities
 4 - Import them using the matching rule
 5 - On the 'Manage staged records' page view some diffs
 6 - The import record is correct, but the existing records pull form
 bibs
 7 - Apply patch
 8 - Repeat
 9 - Confirm you see the expected authority matches
Comment 2 M. Tompsett 2018-10-16 15:02:12 UTC
Created attachment 80657 [details] [review]
Bug 21579: Make showdiffmarc.pl work for authorities and biblios

To test:
 1 - Have or make some authority records
 2 - Have or make an authority matching rule
 3 - Export your authrotities
 4 - Import them using the matching rule
 5 - On the 'Manage staged records' page view some diffs
 6 - The import record is correct, but the existing records pull form
 bibs
 7 - Apply patch
 8 - Repeat
 9 - Confirm you see the expected authority matches

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 3 Katrin Fischer 2018-10-16 17:39:11 UTC
Possible duplicate with bug 16954?
Comment 4 Katrin Fischer 2018-10-16 17:40:11 UTC
*** Bug 16954 has been marked as a duplicate of this bug. ***
Comment 5 sandboxes@biblibre.com 2018-10-16 18:04:13 UTC
Patch tested with a sandbox, by Marjorie Vila <marjorie.barry-vila@collecto.ca>
Comment 6 sandboxes@biblibre.com 2018-10-16 18:04:43 UTC
Created attachment 80674 [details] [review]
Bug 21579: Make showdiffmarc.pl work for authorities and biblios

To test:
 1 - Have or make some authority records
 2 - Have or make an authority matching rule
 3 - Export your authrotities
 4 - Import them using the matching rule
 5 - On the 'Manage staged records' page view some diffs
 6 - The import record is correct, but the existing records pull form
 bibs
 7 - Apply patch
 8 - Repeat
 9 - Confirm you see the expected authority matches

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marjorie Vila <marjorie.barry-vila@collecto.ca>
Comment 7 Jonathan Druart 2018-10-16 20:46:38 UTC
+        diff_url => $match_id ? "/cgi-bin/koha/tools/showdiffmarc.pl?batchid=$import_batch_id&importid=$record->{import_record_id}&id=$match_id&type=$record->{record_type}" : undef

This is wrong, we should build the URL template-side, but existed prior to this patch.
Comment 8 Jonathan Druart 2018-10-16 20:47:05 UTC
Created attachment 80682 [details] [review]
Bug 21579: Make showdiffmarc.pl work for authorities and biblios

To test:
 1 - Have or make some authority records
 2 - Have or make an authority matching rule
 3 - Export your authrotities
 4 - Import them using the matching rule
 5 - On the 'Manage staged records' page view some diffs
 6 - The import record is correct, but the existing records pull form
 bibs
 7 - Apply patch
 8 - Repeat
 9 - Confirm you see the expected authority matches

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marjorie Vila <marjorie.barry-vila@collecto.ca>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Nick Clemens 2018-10-17 19:26:13 UTC
Awesome work all!

Pushed to master for 18.11
Comment 10 Martin Renvoize 2018-10-26 11:50:05 UTC
Pushed to 18.05.x for 18.05.06
Comment 11 Fridolin SOMERS 2018-11-09 14:04:39 UTC
Pushed to 17.11.x for 17.11.12
Comment 12 Nick Clemens 2018-11-15 16:16:30 UTC
*** Bug 15026 has been marked as a duplicate of this bug. ***