Bug 6520

Summary: Items don't display when viewing staged records
Product: Koha Reporter: Jared Camins-Esakov <jcamins>
Component: ToolsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: P5 - low CC: chris, gmcharlt, jonathan.druart, katrin.fischer, nengard, nick, tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 24827    
Attachments: Bug 6520: Display items for staged record
Bug 6520: Display items for staged record
Bug 6520: Display items for staged record
Bug 6520: Display items for staged record - diff view
Bug 6520: Add unit test for C4::ImportBatch::GetRecordFromImportBiblio
[PASSED QA] Bug 6520: Display items for staged record
[PASSED QA] Bug 6520: Display items for staged record - diff view
[PASSED QA] Bug 6520: Add unit test for C4::ImportBatch::GetRecordFromImportBiblio

Description Jared Camins-Esakov 2011-06-20 23:06:45 UTC
When you view a staged record, even if you're adding items, the items don't show up because they're no longer included in the bib record's marc. They should be added in for display purposes.
Comment 1 Owen Leonard 2013-03-26 22:56:32 UTC
This bug is still valid in master as of 3.12 beta1.
Comment 2 Jonathan Druart 2015-03-27 12:41:44 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-03-27 12:44:49 UTC Comment hidden (obsolete)
Comment 4 Nicole C. Engard 2015-03-29 19:58:42 UTC Comment hidden (obsolete)
Comment 5 Nicole C. Engard 2015-03-29 19:59:02 UTC
Processing files before patches
|========================>| 2 / 2 (100.00%)
Processing files after patches
|========================>| 2 / 2 (100.00%)

 OK	C4/ImportBatch.pm
   OK	  critic
   OK	  forbidden patterns
   OK	  pod
   OK	  valid

 OK	catalogue/showmarc.pl
   OK	  critic
   OK	  forbidden patterns
   OK	  pod
   OK	  valid
Comment 6 Katrin Fischer 2015-04-05 21:58:00 UTC
I found t/db_dependent/ImportBatch.t, but it only includes 5 tests. Maybe they could be a starting point?

I am a bit worried by the mismatch of the MARC view with the new diff view. Could we also include the item information in the new diff view?

Please read 'Failed QA' as 'Asking for feedback' - tests looking ok so far :)
Comment 7 Jonathan Druart 2015-04-07 09:50:32 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2015-04-07 10:30:34 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2015-04-07 20:13:32 UTC
Created attachment 37552 [details] [review]
[PASSED QA] Bug 6520: Display items for staged record

When records are imported into Koha, the items is stored into the
import_items table.
This marcxml in this table is never retrieved to display items.

Test plan:
1/ Import a records with items
2/ Before importing the batch into the catalog, you can see the marc
of the records, in the table below.
3/ Verify that the items is correctly displayed.

QA note: This patch does not provide test for new subroutines but the
module (C4::ImportBatch) is not tested at all and it will be time
consuming to provide them.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2015-04-07 20:13:36 UTC
Created attachment 37553 [details] [review]
[PASSED QA] Bug 6520: Display items for staged record - diff view

This patchs adds the item information in the diff view.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2015-04-07 20:13:39 UTC
Created attachment 37554 [details] [review]
[PASSED QA] Bug 6520: Add unit test for C4::ImportBatch::GetRecordFromImportBiblio

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Tomás Cohen Arazi 2015-04-16 17:22:50 UTC
Patches pushed to master.

Thanks Jonathan!
Comment 13 Chris Cormack 2015-04-21 23:08:01 UTC
Pushed to 3.18.x will be in 3.18.6