Bug 19266

Summary: Add ability to update 005 during import of records and check 001 uniqueness on save to batch
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: CatalogingAssignee: Cori Lynn Arnold <carnold>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: andrewfh, bgkriegel, m.de.rooy
Version: unspecified   
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: 19265    
Bug Blocks:    
Attachments: Bug 19266: Allow 001 matching and 005 update on import of records
Bug 19266: Allow 001 matching and 005 update on import of records
Bug 19266: Allow 001 checking on save to batch and 005 update on import of records
Bug 19266: Allow 001 checking on save to batch and 005 update on import of records
Bug 19266: Allow 001 checking on save to batch and 005 update on import of records

Description Nick Clemens (kidclamp) 2017-09-06 18:00:04 UTC

    
Comment 1 Nick Clemens (kidclamp) 2017-09-06 18:07:28 UTC
Created attachment 66901 [details] [review]
Bug 19266: Allow 001 matching and 005 update on import of records
Comment 2 Nick Clemens (kidclamp) 2017-09-06 18:11:55 UTC
Created attachment 66902 [details] [review]
Bug 19266: Allow 001 matching and 005 update on import of records
Comment 3 Nick Clemens (kidclamp) 2018-08-16 12:03:28 UTC
Created attachment 77905 [details] [review]
Bug 19266: Allow 001 checking on save to batch and 005 update on import of records

To test:
 1 - Export a set of records with control numbers from your system
 2 - Stage those records
 3 - Note during staging a new option to update the 005
 4 - Check records after staging
 5 - Note 005 is updated or not as the option is selected
 6 - Open the advanced cataloging editor
 7 - Under settings choose Import Batches
 8 - Set the batch you just imported as a save target
 9 - Select that batch only as save target
10 - Create a new record, give it the control number of a record in the
batch
11 - Attempt to save to the batch
12 - You get an error
13 - Save overriding warnings
14 - The record is then added to the batch
Comment 4 Alex Arnaud 2019-03-08 15:27:21 UTC
Created attachment 86387 [details] [review]
Bug 19266: Allow 001 checking on save to batch and 005 update  on import of records

To test:
 1 - Export a set of records with control numbers from your system
 2 - Stage those records
 3 - Note during staging a new option to update the 005
 4 - Check records after staging
 5 - Note 005 is updated or not as the option is selected
 6 - Open the advanced cataloging editor
 7 - Under settings choose Import Batches
 8 - Set the batch you just imported as a save target
 9 - Select that batch only as save target
10 - Create a new record, give it the control number of a record in the
batch
11 - Attempt to save to the batch
12 - You get an error
13 - Save overriding warnings
14 - The record is then added to the batch

Rebased-on 2019-03-08 (alex.arnaud@biblibre.com)
Comment 5 Nick Clemens (kidclamp) 2020-03-23 14:02:12 UTC
Dependencies blocked
Comment 6 Andrew Fuerste-Henry 2021-05-20 16:41:22 UTC
Hi folks!
Is anyone still working on this? Would this make more sense to split up into multiple smaller bugs?
I have a library who'd like the 005 to populate at import but doesn't care about matching on the 001 or all the cool Rancor stuff that the blocking bugs want to get up to.
Comment 7 Katrin Fischer 2021-05-24 13:48:51 UTC
(In reply to Andrew Fuerste-Henry from comment #6)
> Hi folks!
> Is anyone still working on this? Would this make more sense to split up into
> multiple smaller bugs?
> I have a library who'd like the 005 to populate at import but doesn't care
> about matching on the 001 or all the cool Rancor stuff that the blocking
> bugs want to get up to.

I agree with Andrew in splitting this up into 2 feature bugs. I really believe we should handle the 005 separately from the 001 check, but I'd actually like both features! We do work a lot with 001 so this might come in handy.
Comment 8 Nick Clemens (kidclamp) 2021-06-15 13:16:32 UTC
Created attachment 122003 [details] [review]
Bug 19266: Allow 001 checking on save to batch and 005 update on import of records

To test:
 1 - Export a set of records with control numbers from your system
 2 - Stage those records
 3 - Note during staging a new option to update the 005
 4 - Check records after staging
 5 - Note 005 is updated or not as the option is selected
 6 - Open the advanced cataloging editor
 7 - Under settings choose Import Batches
 8 - Set the batch you just imported as a save target
 9 - Select that batch only as save target
10 - Create a new record, give it the control number of a record in the
batch
11 - Attempt to save to the batch
12 - You get an error
13 - Save overriding warnings
14 - The record is then added to the batch
Comment 9 Nick Clemens (kidclamp) 2021-06-15 13:17:07 UTC
Attempted to rebase and remove dependencies, untested
Comment 10 Andrew Fuerste-Henry 2021-06-15 15:12:35 UTC
I get a big angry error when trying to go to the cataloging module with Nick's patch applied:
Could not compile /kohadevbox/koha/cataloguing/addbooks.pl: Global symbol "$marc_records" requires explicit package name (did you forget to declare "my $marc_records"?) at /kohadevbox/koha/C4/ImportBatch.pm line 455.
Global symbol "$num_matched_control_number" requires explicit package name (did you forget to declare "my $num_matched_control_number"?) at /kohadevbox/koha/C4/ImportBatch.pm line 479.
Global symbol "$num_matched_control_number" requires explicit package name (did you forget to declare "my $num_matched_control_number"?) at /kohadevbox/koha/C4/ImportBatch.pm line 516.
Compilation failed in require at /kohadevbox/koha/C4/Breeding.pm line 29.
BEGIN failed--compilation aborted at /kohadevbox/koha/C4/Breeding.pm line 29.
Compilation failed in require at /kohadevbox/koha/cataloguing/addbooks.pl line 33.
BEGIN failed--compilation aborted at /kohadevbox/koha/cataloguing/addbooks.pl line 33.
 at /usr/share/perl5/CGI/Compile.pm line 132