Bug 5633 - import borrower, add command line option
Summary: import borrower, add command line option
Status: RESOLVED DUPLICATE of bug 12598
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P2 enhancement
Assignee: Matthias Meusburger
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks: 5992
  Show dependency treegraph
 
Reported: 2011-01-19 20:42 UTC by Paul Poulain
Modified: 2014-07-20 21:03 UTC (History)
6 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Proposed Patch (12.25 KB, patch)
2011-03-30 21:53 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 5633 : MT2897 : Allow import_borrowers.pl to be used in commandline mode (12.32 KB, patch)
2011-06-07 00:35 UTC, Jesse Weaver
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Poulain 2011-01-19 20:42:32 UTC
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.
Comment 1 Chris Cormack 2011-03-30 21:53:15 UTC Comment hidden (obsolete)
Comment 2 Joe Atzberger 2011-06-01 05:23:23 UTC
Probably should use Pod::Usage for best compatibility of usage notes.
Comment 3 Jesse Weaver 2011-06-07 00:35:23 UTC Comment hidden (obsolete)
Comment 4 Paul Poulain 2011-08-03 16:08:12 UTC
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.
Comment 5 Ian Walls 2011-08-05 11:51:41 UTC
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.
Comment 6 Paul Poulain 2012-01-19 14:56:16 UTC
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 ;-)
Comment 7 Katrin Fischer 2014-07-20 21:03:53 UTC
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 ***