[Bug 10477] New: Increased flexibility for upload of Staged MARC records
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 Bug ID: 10477 Summary: Increased flexibility for upload of Staged MARC records Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: amitddng135@gmail.com Increased flexibility for upload of Staged MARC records. When uploading bulk MARC records against existing records - need further option to allow the process to just add/merge extra MARC tags rather than having to completely overwrite an existing record or just leave the existing record unchanged. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 Amit <amitddng135@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |colin.campbell@ptfs-europe. | |com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 --- Comment #1 from Amit <amitddng135@gmail.com> --- Created attachment 19213 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19213&action=edit Increased flexibility for upload of Staged When uploading bulk MARC records against existing records need further option to allow the process to just add/merge extra MARC tags rather than having to completely overwrite an existing record or just leave the existing record unchanged. Test Plan: 1. Click on Tools->Stage MARC records for import. 2. Upload the MARC file for ex: first.mrc 3. Click on upload button. 4. Choose Record matching rule: 020$a ISBN. 5. Choose Action if matching record found: Append or update MARC21/UNIMARC tag a text box will appear after choosing enter MARC tag for ex: 700a which you want to merge. 6. Click on Stage for import button. 7. On the next screen click on Manage staged records. 8. You can also edit the record matching rule in manage record screen. 9. Click on Import this batch on catalog button. 10. Next screen will give no of record updated. 11. It will check duplicate field record for ex: 700$aamit is already in record it will skip the tag and move to next. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 --- Comment #2 from Amit <amitddng135@gmail.com> --- Created attachment 19214 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19214&action=edit Alter table import_batches Added overlay_action to "appendmarctag" and new column "marctag" -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 Amit <amitddng135@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |amit.gupta@osslabs.biz |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 I'm just a bot <gitbot@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |gitbot@bugs.koha-community. | |org --- Comment #3 from I'm just a bot <gitbot@bugs.koha-community.org> --- Applying: Bug-10477 Increased flexibility for upload of Staged Using index info to reconstruct a base tree... M koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt M tools/manage-marc-import.pl Falling back to patching base and 3-way merge... Auto-merging tools/manage-marc-import.pl Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt Patch failed at 0001 Bug-10477 Increased flexibility for upload of Staged The copy of the patch that failed is found in: /home/christopher/git/koha/.git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 Amit <amitddng135@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19213|0 |1 is obsolete| | Attachment #19214|0 |1 is obsolete| | CC| |amitddng135@gmail.com --- Comment #4 from Amit <amitddng135@gmail.com> --- Created attachment 22034 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22034&action=edit Bug-10477 Increased flexibility for upload of Staged When uploading bulk MARC records against existing records need further option to allow the process to just add/merge extra MARC tags rather than having to completely overwrite an existing record or just leave the existing record unchanged. Test Plan: 1. Click on Tools->Stage MARC records for import. 2. Upload the MARC file for ex: first.mrc 3. Click on upload button. 4. Choose Record matching rule: 020$a ISBN. 5. Choose Action if matching record found: Append or update MARC21/UNIMARC tag a text box will appear after choosing enter MARC tag for ex: 700a which you want to merge. 6. Click on Stage for import button. 7. On the next screen click on Manage staged records. 8. You can also edit the record matching rule in manage record screen. 9. Click on Import this batch on catalog button. 10. Next screen will give no of record updated. 11. It will check duplicate field record for ex: 700$aamit is already in record it will skip the tag and move to next. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 --- Comment #5 from Amit <amitddng135@gmail.com> --- Created attachment 22035 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22035&action=edit Alter table import_batches Added overlay_action to "appendmarctag" and new column "marctag" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 Amit <amitddng135@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 I'm just a bot <gitbot@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply When did the bot| |2013-10-30 last check this| | --- Comment #6 from I'm just a bot <gitbot@bugs.koha-community.org> --- Applying: Bug-10477-Alter table import_batches Using index info to reconstruct a base tree... M installer/data/mysql/kohastructure.sql M installer/data/mysql/updatedatabase.pl Falling back to patching base and 3-way merge... Auto-merging installer/data/mysql/updatedatabase.pl CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl Auto-merging installer/data/mysql/kohastructure.sql Patch failed at 0001 Bug-10477-Alter table import_batches The copy of the patch that failed is found in: /home/christopher/git/koha/.git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #22034|0 |1 is obsolete| | --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 22536 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22536&action=edit Bug-10477 Increased flexibility for upload of Staged When uploading bulk MARC records against existing records need further option to allow the process to just add/merge extra MARC tags rather than having to completely overwrite an existing record or just leave the existing record unchanged. Test Plan: 1. Click on Tools->Stage MARC records for import. 2. Upload the MARC file for ex: first.mrc 3. Click on upload button. 4. Choose Record matching rule: 020$a ISBN. 5. Choose Action if matching record found: Append or update MARC21/UNIMARC tag a text box will appear after choosing enter MARC tag for ex: 700a which you want to merge. 6. Click on Stage for import button. 7. On the next screen click on Manage staged records. 8. You can also edit the record matching rule in manage record screen. 9. Click on Import this batch on catalog button. 10. Next screen will give no of record updated. 11. It will check duplicate field record for ex: 700$aamit is already in record it will skip the tag and move to next. Signed-off-by: Amit Gupta <amitddng135@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #22035|0 |1 is obsolete| | --- Comment #8 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 22537 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22537&action=edit Bug-10477-Alter table import_batches Added overlay_action to "appendmarctag" and new column "marctag" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #22536|0 |1 is obsolete| | Attachment #22537|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 24066 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24066&action=edit Bug-10477 Increased flexibility for upload of Staged When uploading bulk MARC records against existing records need further option to allow the process to just add/merge extra MARC tags rather than having to completely overwrite an existing record or just leave the existing record unchanged. Test Plan: 1. Click on Tools->Stage MARC records for import. 2. Upload the MARC file for ex: first.mrc 3. Click on upload button. 4. Choose Record matching rule: 020$a ISBN. 5. Choose Action if matching record found: Append or update MARC21/UNIMARC tag a text box will appear after choosing enter MARC tag for ex: 700a which you want to merge. 6. Click on Stage for import button. 7. On the next screen click on Manage staged records. 8. You can also edit the record matching rule in manage record screen. 9. Click on Import this batch on catalog button. 10. Next screen will give no of record updated. 11. It will check duplicate field record for ex: 700$aamit is already in record it will skip the tag and move to next. Signed-off-by: Amit Gupta <amitddng135@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 24067 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24067&action=edit Bug-10477-Alter table import_batches Added overlay_action to "appendmarctag" and new column "marctag" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #11 from Jonathan Druart <jonathan.druart@biblibre.com> --- Rebased patches. I did not test. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 nicolas <nicolas.bravais@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |nicolas.bravais@gmail.com --- Comment #12 from nicolas <nicolas.bravais@gmail.com> --- Patch works correctly! thx -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sandboxes@biblibre.com --- Comment #13 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Patch tested with a sandbox, by Nicolas B. <n.bravais@mairie-decines.fr> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24066|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24067|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 --- Comment #14 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 24159 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24159&action=edit Bug-10477 Increased flexibility for upload of Staged When uploading bulk MARC records against existing records need further option to allow the process to just add/merge extra MARC tags rather than having to completely overwrite an existing record or just leave the existing record unchanged. Test Plan: 1. Click on Tools->Stage MARC records for import. 2. Upload the MARC file for ex: first.mrc 3. Click on upload button. 4. Choose Record matching rule: 020$a ISBN. 5. Choose Action if matching record found: Append or update MARC21/UNIMARC tag a text box will appear after choosing enter MARC tag for ex: 700a which you want to merge. 6. Click on Stage for import button. 7. On the next screen click on Manage staged records. 8. You can also edit the record matching rule in manage record screen. 9. Click on Import this batch on catalog button. 10. Next screen will give no of record updated. 11. It will check duplicate field record for ex: 700$aamit is already in record it will skip the tag and move to next. Signed-off-by: Amit Gupta <amitddng135@gmail.com> Signed-off-by: Nicolas B. <n.bravais@mairie-decines.fr> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 --- Comment #15 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 24160 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24160&action=edit Bug-10477-Alter table import_batches Added overlay_action to "appendmarctag" and new column "marctag" Signed-off-by: Nicolas B. <n.bravais@mairie-decines.fr> Signed-off-by: Nicolas B <n.bravais@mairie-decines.fr> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #16 from Jonathan Druart <jonathan.druart@biblibre.com> --- Hello Amit, Could you provide unit tests for changes introduced in modules please? Marked as Failed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 --- Comment #17 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 24160 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24160 Bug-10477-Alter table import_batches Review of attachment 24160: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=10477&attachment=24160) ----------------------------------------------------------------- ::: installer/data/mysql/updatedatabase.pl @@ +7914,5 @@
+$DBversion = "3.15.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("ALTER TABLE import_batches MODIFY overlay_action enum('replace', 'create_new', 'use_template', 'ignore', 'appendmarctag') NOT NULL default 'create_new'"); + $dbh->do("ALTER TABLE import_batches ADD COLUMN marctag mediumtext");
You should probably add an 'AFTER' statement, so that the kohastructure.sql and updatedatabase.pl will generate the same field order. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 --- Comment #18 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 24159 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24159 Bug-10477 Increased flexibility for upload of Staged Review of attachment 24159: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=10477&attachment=24159) ----------------------------------------------------------------- ::: C4/ImportBatch.pm @@ +249,5 @@
+ my $sth = $dbh->prepare("UPDATE import_batches SET marctag = ? WHERE import_batch_id = ?"); + $sth->execute($marctag, $batch_id); + return; +} +
When you add functions to a C4 or Koha library, you need to make sure there is a test file. There is no ./t/db_dependent/ImportBatch.t file, which is likely what you need to create, since this requires the import_batches table. The test file generally calls the functions/methods in every way that could be done normally inside code. @@ +724,5 @@
+ $sth->execute($oldxml, $rowref->{'import_record_id'}); + $sth = $dbh->prepare($query); + $sth->execute($recordid, $rowref->{'import_record_id'}); + SetImportRecordOverlayStatus($rowref->{'import_record_id'}, 'match_applied'); + SetImportRecordStatus($rowref->{'import_record_id'}, 'imported');
And your test file will have to trigger this code segment too. :) ::: tools/manage-marc-import.pl @@ +228,3 @@
}; } $template->param(batch_list => \@list);
Make sure your git repo has: git config --global core.whitespace trailing-space,space-before-tab git config --global apply.whitespace fix -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 Jacek Ablewicz <abl@biblos.pk.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |abl@biblos.pk.edu.pl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org