import_borrowers.pl is a usefull tool. Under certain circumstances, it's even more usefull to run it in command line mode (like in a daily cron). We will add parameters & features to manage this goal.
Created attachment 3555 [details] [review] Proposed Patch
Probably should use Pod::Usage for best compatibility of usage notes.
Created attachment 4388 [details] [review] Bug 5633 : MT2897 : Allow import_borrowers.pl to be used in commandline mode Signed-off-by: Jesse Weaver <pianohacker@gmail.com>
QA comment Marking "failed QA" for 2 reasons : * I could not test it = there is no CSV example file provided, I tried various configurations, without success * A little bit more information could/should be given in the --help : "the logs of the import are stored in /var/log/koha/reports/ (if you have permissions to do so), and a mail is sent to KohaAdminEmailAddress (system preference) witht the result of the import as well". It could be worth to display an example as well, to avoid #1 from users ! Other points : * Apply cleanly * The "proposed patch" is obsoleted by jesse sign-off Jesse/hdl, if you give me a testing CSV i'll try again ! I can take care of the follow-up of more doc.
I've marked the "proposed patch" as obsolete. An example CSV, along with a test plan, would go a long way towards making this patch more QA-able.
Matthias, could you resubmit a patch for this feature BUT, it must not be an enhancement in the tools/ directory, as we've decided not to have scripts that can be run from commandline and http, for security reasons. So please do a script in misc/migration_tools As most of the code will be common to both scripts (tools & command-line), you should put common subs into C4/Members.pm module where it's usefull When reading the patch, seeing many lines like this: - $template->param('lastoverwritten'=>$borrower{'surname'}.' / '.$borrowernumber); + $template->param('lastoverwritten'=>$borrower{'surname'}.' / '.$borrowernumber) if (!$commandline); make me feel the misc/migration_tools/import_borrowers.pl script will have less lines than the tools one ;-)
As the patch here is obsoleted, I mark it as duplicate of 12598 that has a new patch. *** This bug has been marked as a duplicate of bug 12598 ***