Bugzilla – Attachment 69981 Details for
Bug 19712
Fix command line options of delete_records_via_leader.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19712: Fix test mode for delete_records_via_leader.pl
Bug-19712-Fix-test-mode-for-deleterecordsvialeader.patch (text/plain), 1.41 KB, created by
Jonathan Druart
on 2017-12-20 22:13:08 UTC
(
hide
)
Description:
Bug 19712: Fix test mode for delete_records_via_leader.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-12-20 22:13:08 UTC
Size:
1.41 KB
patch
obsolete
>From 7734949c73460ebad8a7a73473e4d925ad844b15 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 20 Dec 2017 19:10:44 -0300 >Subject: [PATCH] Bug 19712: Fix test mode for delete_records_via_leader.pl > >Test plan: >perl misc/cronjobs/delete_records_via_leader.pl >=> Should display a warning >perl misc/cronjobs/delete_records_via_leader.pl --test >=> Should not display a warning and script should not apply changes >perl misc/cronjobs/delete_records_via_leader.pl --confirm >=> Should not display a warning and script should apply changes >--- > misc/cronjobs/delete_records_via_leader.pl | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/misc/cronjobs/delete_records_via_leader.pl b/misc/cronjobs/delete_records_via_leader.pl >index b4d87810be..291ab6bedf 100755 >--- a/misc/cronjobs/delete_records_via_leader.pl >+++ b/misc/cronjobs/delete_records_via_leader.pl >@@ -53,7 +53,14 @@ GetOptions( > 'h|help' => \$help, > ); > >-if ( $help || !$confirm ) { >+pod2usage(q|--test and --confirm cannot be specified together|) if $test and $confirm; >+ >+unless ( $confirm or $test ) { >+ warn "Running in test mode as --confirm is not passed\n"; >+ $test = 1; >+} >+ >+if ( $help ) { > say qq{ > delete_records_via_leader.pl - Attempt to delete any MARC records where the leader character 5 equals 'd' > usage: delete_records_via_leader.pl --confirm --verbose [--test] >-- >2.11.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 19712
:
69981
|
70732
|
72925
|
72926
|
73752
|
73753