Summary: | Need a delete biblios script | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Cataloging | Assignee: | Galen Charlton <gmcharlt> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | kyle, m.de.rooy, magnus, nengard, paul.poulain, stephane.delaye |
Version: | 3.10 | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | |||
Bug Blocks: | 8149 | ||
Attachments: |
Bug 8438: Adds script batchdeletebiblios
Bug 8674: Adds script batchdeletebiblios Bug 8674: Followup: Add POD for misc/batchdeletebiblios.pl Bug 8674: Adds script batchdeletebiblios Bug 8674: Followup: Add POD for misc/batchdeletebiblios.pl Bug 8674 follow-up Fix perlcritic error |
Description
Jonathan Druart
2012-08-23 12:26:05 UTC
Created attachment 11779 [details] [review] Bug 8438: Adds script batchdeletebiblios This script batch deletes biblios which contain a biblionumber present in file passed in parameter. If one biblio has items, it is not deleted. Created attachment 11780 [details] [review] Bug 8674: Adds script batchdeletebiblios This script batch deletes biblios which contain a biblionumber present in file passed in parameter. If one biblio has items, it is not deleted. I realize that we don't really have firm coding guidelines for command line scripts (http://wiki.koha-community.org/wiki/Coding_Guidelines#Command-line_argument_conventions sounds preliminary), but I'm inclined to not sign off on this script because it offers no help to the user. Running it with no arguments doesn't give me feedback about specifying a file, and running it with "--help" returns no help. Other than that the script seems to be working as expected. Records with items are not deleted, records without items are deleted and added to oldbiblio. I wonder if it would be useful to show a different message if a biblionumber is not found? Re-running the script on a file of already-deleted records returns "OK" for each. Created attachment 11887 [details] [review] Bug 8674: Followup: Add POD for misc/batchdeletebiblios.pl (In reply to comment #3) Hi Owen, > I realize that we don't really have firm coding guidelines for command line > scripts > (http://wiki.koha-community.org/wiki/Coding_Guidelines#Command- > line_argument_conventions sounds preliminary), but I'm inclined to not sign > off on this script because it offers no help to the user. Running it with no > arguments doesn't give me feedback about specifying a file, and running it > with "--help" returns no help. Yes, you are totally right. Thank you. > I wonder if it would be useful to show a different message if a biblionumber > is not found? Re-running the script on a file of already-deleted records > returns "OK" for each. I think it is a problem in DelBiblio. If this routine returns an error or die, the script will know there is a problem. This patch adds POD for the script. i test in a sandbox . it's ok perl batchdeletebiblios.pl file name or perl batchdeletebiblios.pl /home/directory_name/file_name Created attachment 11919 [details] [review] Bug 8674: Adds script batchdeletebiblios This script batch deletes biblios which contain a biblionumber present in file passed in parameter. If one biblio has items, it is not deleted. http://bugs.koha-community.org/show_bug.cgi?id=8674 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created file with biblionumbers for bibs with and without items. Only the bibs without items were deleted. Created attachment 11920 [details] [review] Bug 8674: Followup: Add POD for misc/batchdeletebiblios.pl Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> I should note that I did test the help, it displays when the script is run with no arguments, or when -h or --help is passed. (In reply to comment #7) > Created attachment 11920 [details] [review] > Bug 8674: Followup: Add POD for misc/batchdeletebiblios.pl > > Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> QA comment: * 0 side effect risk: new script in misc * script located at same place as many other batchsomething, so it's OK * passes koha-qa.pl after a tiny follow-up for perlcritic ( file opening was not perlcritic compliant) passed QA Created attachment 12647 [details] [review] Bug 8674 follow-up Fix perlcritic error |