Bugzilla – Attachment 54703 Details for
Bug 14504
Add command-line script to batch delete items based on data in items table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14504: (followup) Make deletion conditional on --commit
Bug-14504-followup-Make-deletion-conditional-on---.patch (text/plain), 1.54 KB, created by
Tomás Cohen Arazi
on 2016-08-22 13:40:53 UTC
(
hide
)
Description:
Bug 14504: (followup) Make deletion conditional on --commit
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2016-08-22 13:40:53 UTC
Size:
1.54 KB
patch
obsolete
>From 56a79a8bc49a40095c9c7ce1dcedd88a75e5975f Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 22 Aug 2016 10:34:48 -0300 >Subject: [PATCH] Bug 14504: (followup) Make deletion conditional on --commit > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > misc/cronjobs/delete_items.pl | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/misc/cronjobs/delete_items.pl b/misc/cronjobs/delete_items.pl >index 7d15560..78a9b35 100755 >--- a/misc/cronjobs/delete_items.pl >+++ b/misc/cronjobs/delete_items.pl >@@ -42,7 +42,7 @@ my @where = @{ $OPTIONS->{where} }; > > pod2usage( -verbose => 2 ) if $OPTIONS->{flags}->{manual}; > pod2usage( -verbose => 1 ) if $OPTIONS->{flags}->{help}; >-pod2usage( -verbose => 1 -msg => 'You must supply at least one --where option' ) if scalar @where == 0; >+pod2usage( -verbose => 1 -msg => 'You must supply at least one --where option' ) if scalar @where == 0; > > sub verbose { > say @_ if $OPTIONS->{flags}->{verbose}; >@@ -59,7 +59,8 @@ DELITEM: while ( my $item = $GLOBAL->{sth}->{target_items}->fetchrow_hashref() ) > > my $status = C4::Items::ItemSafeToDelete( $item->{biblionumber}, $item->{itemnumber} ); > if( $status eq '1' ) { >- C4::Items::DelItemCheck( $item->{biblionumber}, $item->{itemnumber} ); >+ C4::Items::DelItemCheck( $item->{biblionumber}, $item->{itemnumber} ) >+ if $OPTIONS->{flags}->{commit}; > verbose "Deleting '$item->{itemnumber}'"; > } else { > verbose "Item '$item->{itemnumber}' not deletd: $status"; >-- >2.9.2
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 14504
:
40830
|
42978
|
43445
|
43533
|
43788
|
43789
|
44013
|
44149
|
45789
|
49648
|
49649
|
49650
|
49651
|
49652
|
49653
|
52425
|
53224
|
53225
|
54514
|
54515
|
54516
|
54517
|
54518
|
54519
|
54520
|
54521
|
54522
|
54525
|
54530
|
54531
|
54691
|
54692
|
54693
|
54694
|
54695
|
54696
|
54697
|
54698
|
54699
|
54700
|
54701
|
54702
| 54703