Bug 9739: more options for serialsUpdate.pl
authorFridolyn SOMERS <fridolyn.somers@biblibre.com>
Thu, 28 Feb 2013 17:21:18 +0000 (18:21 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Sun, 20 Oct 2013 18:56:09 +0000 (18:56 +0000)
commit3a1a94d4ef9bf65eba7181c81d8a3f5af5e2c5aa
tree8bb9e1127c94503b94c8c3407dd292f2bb6ae6c9
parente9d45e4f6a39d716f3282cd0468d84296cfc4a90
Bug 9739: more options for serialsUpdate.pl

Script serialsUpdate.pl must be set in crontab to run daily.
It checks serials that are late, modifies status and adds a note.

This patch adds some options :
--note : defined note, a defaut one is used if not defined
--no-note : disable automatic note
--verbose : used to control output
This patch also implements confirmation option "-c" who whas present but not used.

Test plan :
Run script on a database with late serials :
- serialsUpdate.pl -h
=> you get help text in output
- serialsUpdate.pl --man
=> you get full help
- serialsUpdate.pl -v
=> you get output of changed serials but database has not changed
- serialsUpdate.pl -c -v
=> you get output of changed serials and database has changed, with note "Automatically set to late"
- serialsUpdate.pl -c
=> database has changed without anything in output
- serialsUpdate.pl -c --note "LATE"
=> database has changed, with note "LATE"
- serialsUpdate.pl -c --no-note
=> database has changed with no note

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described. No koha-qa errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
New options behave as described.
There are some existing problems with this script that I have noted
directly on the bug report.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
misc/cronjobs/serialsUpdate.pl