Bugzilla – Attachment 73752 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.57 KB, created by
Marcel de Rooy
on 2018-04-06 09:23:12 UTC
(
hide
)
Description:
Bug 19712: Fix test mode for delete_records_via_leader.pl
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-04-06 09:23:12 UTC
Size:
1.57 KB
patch
obsolete
>From f2840e5100e2853b8851bf115a6951677f12fb68 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 >Content-Type: text/plain; charset=utf-8 > >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 > >Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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 b4d8781..291ab6b 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.1.4
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