[Koha-bugs] [Bug 14504] New: Add command-line script to batch delete items based on lost/withdrawn statuses
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Jul 7 21:15:11 CEST 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504
Bug ID: 14504
Summary: Add command-line script to batch delete items based on
lost/withdrawn statuses
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Command-line Utilities
Assignee: gmcharlt at gmail.com
Reporter: barton at bywatersolutions.com
QA Contact: testopia at bugs.koha-community.org
CC: robin at catalyst.net.nz
Intention of development:
To create a script to delete items based on a series of criteria, primarily
itemlost, timestamp, itemlost_on, and withdrawn
delete_items.pl --criteria EXPRESSION [--commit]
Where EXPRESSION is a valid SQL conditional, operating on the items table, e.g.
items.itemlost => 1
or
items.timestamp < 2014-06-07
--criteria may be called multiple times.
--commit is necessary to actually delete the items.
Here are a few examples of how this might be called:
delete_items.pl --verbose --criteria "items.itemlost >= 1" --criteria
"items.itemlost <= 4" --criteria "items.itemlost_on < '$(date --date="13 month
ago" --rfc-3339=date)'" --commit
delete_items.pl --verbose --criteria "items.itemlost >= 1" --criteria
"items.itemlost <= 4" --criteria "items.timestamp < '$(date --date="13 month
ago" --rfc-3339=date)'" --commit
delete_items.pl --verbose --criteria "items.withdrawn != 0" --criteria
"items.timestamp < '$(date --date="13 month ago" --rfc-3339=date)'" --commit
delete_items.pl --verbose --criteria "items.withdrawn != 0" --criteria
"items.itemlost_on < '$(date --date="13 month ago" --rfc-3339=date)'" --commit
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list