Bugzilla – Attachment 45985 Details for
Bug 12289
stage_file.pl does not allow control of nomatch options
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12289: Add --no-create options to stage_file.pl
Bug-12289-Add---no-create-options-to-stagefilepl.patch (text/plain), 2.27 KB, created by
Jonathan Druart
on 2015-12-26 11:47:26 UTC
(
hide
)
Description:
Bug 12289: Add --no-create options to stage_file.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-12-26 11:47:26 UTC
Size:
2.27 KB
patch
obsolete
>From 4620a195d8824caf98702b64f9cd64176591c60b Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 19 May 2014 13:20:50 +0000 >Subject: [PATCH] Bug 12289: Add --no-create options to stage_file.pl > >This patch adds the no-create options to the command line interface >for bulk loading of records. > >To test >1/ Apply both patches >2/ Call the script with --no-create and your will find that new >records are not created when no match is found. The default, of >create_new remains the same as before. > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > misc/stage_file.pl | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/misc/stage_file.pl b/misc/stage_file.pl >index 3003084..7bb548c 100755 >--- a/misc/stage_file.pl >+++ b/misc/stage_file.pl >@@ -54,6 +54,7 @@ my $result = GetOptions( > 'add-items' => \$add_items, > 'item-action:s' => \$item_action, > 'no-replace' => \$no_replace, >+ 'no-create' => \$no_create, > 'comment:s' => \$batch_comment, > 'authorities' => \$authorities, > 'h|help' => \$want_help >@@ -119,7 +120,7 @@ sub process_batch { > } > # set default record overlay behavior > SetImportBatchOverlayAction($batch_id, ($no_replace) ? 'ignore' : 'replace'); >- SetImportBatchNoMatchAction($batch_id, 'create_new'); >+ SetImportBatchNoMatchAction($batch_id, ($no_create) ? 'ignore' : 'create_new'); > SetImportBatchItemAction($batch_id, $item_action); > print "... looking for matches with records already in database\n"; > $num_with_matches = BatchFindDuplicates($batch_id, $matcher, 10, 100, \&print_progress_and_commit); >@@ -195,6 +196,8 @@ Parameters: > 'ignore', or 'replace' > --no-replace overlay action for record: default is to > replace extant with the imported record. >+ --no-create nomatch action for record: default is to >+ create new record with imported record. > --comment <comment> optional comment to describe > the record batch; if the comment > has spaces in it, surround the >-- >2.1.0
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 12289
:
28330
|
42134
|
45964
|
45965
| 45985 |
45986