Bugzilla – Attachment 84988 Details for
Bug 19164
Allow MARC modification templates to be used in staged MARC imports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19164: (QA follow-up) Minor whitespace cleanup
Bug-19164-QA-follow-up-Minor-whitespace-cleanup.patch (text/plain), 3.78 KB, created by
Martin Renvoize (ashimema)
on 2019-02-11 17:46:47 UTC
(
hide
)
Description:
Bug 19164: (QA follow-up) Minor whitespace cleanup
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-02-11 17:46:47 UTC
Size:
3.78 KB
patch
obsolete
>From e61c378dd25d70f912f246b44b33f1de2f51b6f0 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 11 Feb 2019 17:45:51 +0000 >Subject: [PATCH] Bug 19164: (QA follow-up) Minor whitespace cleanup > >--- > misc/stage_file.pl | 69 ++++++++++++++++++++++++---------------------- > 1 file changed, 36 insertions(+), 33 deletions(-) > >diff --git a/misc/stage_file.pl b/misc/stage_file.pl >index 48074f7351..b86f5254d6 100755 >--- a/misc/stage_file.pl >+++ b/misc/stage_file.pl >@@ -52,18 +52,18 @@ my $marc_mod_template = ''; > my $marc_mod_template_id = undef; > > my $result = GetOptions( >- 'encoding:s' => \$encoding, >- 'file:s' => \$input_file, >- 'format:s' => \$format, >- 'match|match-bibs:s' => \$match, >- 'add-items' => \$add_items, >- 'item-action:s' => \$item_action, >- 'no-replace' => \$no_replace, >- 'no-create' => \$no_create, >- 'comment:s' => \$batch_comment, >- 'authorities' => \$authorities, >- 'marcmodtemplate:s' => \$marc_mod_template, >- 'h|help' => \$want_help >+ 'encoding:s' => \$encoding, >+ 'file:s' => \$input_file, >+ 'format:s' => \$format, >+ 'match|match-bibs:s' => \$match, >+ 'add-items' => \$add_items, >+ 'item-action:s' => \$item_action, >+ 'no-replace' => \$no_replace, >+ 'no-create' => \$no_create, >+ 'comment:s' => \$batch_comment, >+ 'authorities' => \$authorities, >+ 'marcmodtemplate:s' => \$marc_mod_template, >+ 'h|help' => \$want_help > ); > > if($marc_mod_template ne '') { >@@ -104,19 +104,21 @@ unless (-r $input_file) { > > my $dbh = C4::Context->dbh; > $dbh->{AutoCommit} = 0; >-process_batch({ >- format => $format, >- input_file => $input_file, >- record_type => $record_type, >- match => $match, >- add_items => $add_items, >- batch_comment => $batch_comment, >- encoding => $encoding, >- no_replace => $no_replace, >- no_create => $no_create, >- item_action => $item_action, >- marc_mod_template_id => $marc_mod_template_id, >-}); >+process_batch( >+ { >+ format => $format, >+ input_file => $input_file, >+ record_type => $record_type, >+ match => $match, >+ add_items => $add_items, >+ batch_comment => $batch_comment, >+ encoding => $encoding, >+ no_replace => $no_replace, >+ no_create => $no_create, >+ item_action => $item_action, >+ marc_mod_template_id => $marc_mod_template_id, >+ } >+); > $dbh->commit(); > > exit 0; >@@ -139,14 +141,15 @@ sub process_batch { > > print "... staging MARC records -- please wait\n"; > #FIXME: We should really allow the use of marc modification frameworks and to_marc plugins here if possible >- my ($batch_id, $num_valid_records, $num_items, @import_errors) = >- BatchStageMarcRecords( >- $record_type, $params->{encoding}, >- $marc_records, $params->{input_file}, >- $params->{'marc_mod_template_id'}, >- $params->{batch_comment}, '', >- $params->{add_items}, 0, >- 100, \&print_progress_and_commit); >+ my ( $batch_id, $num_valid_records, $num_items, @import_errors ) = >+ BatchStageMarcRecords( >+ $record_type, $params->{encoding}, >+ $marc_records, $params->{input_file}, >+ $params->{'marc_mod_template_id'}, $params->{batch_comment}, >+ '', $params->{add_items}, >+ 0, 100, >+ \&print_progress_and_commit >+ ); > print "... finished staging MARC records\n"; > > my $num_with_matches = 0; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19164
:
66351
|
68239
|
68240
|
68249
|
68341
|
68425
|
70033
|
84167
|
84982
|
84987
| 84988