Bug 16426: follow-up of bug 15840 - correctly manage userid while inserting patrons
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 3 May 2016 07:58:33 +0000 (08:58 +0100)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Fri, 6 May 2016 03:41:37 +0000 (03:41 +0000)
commit7b76b24fad305b0253eb1d779f074d265087ca73
tree99f0346e08614889ab95b22c8e93ecb35d3b29c1
parente883c19f3778c0247c11e6bdd3f27bbdd927468d
Bug 16426: follow-up of bug 15840 - correctly manage userid while inserting patrons

Bug 15840 tried to fix a bug but makes things more complicated than it
was before.
If an userid is not provided for 1 or more rows of the csv file, it
should not be updated. However, if a userid is provided and it already
used by an other patron, the import should fail for this row (but not
crash!).

Test plan:
0/ Create a patron with a userid=your_userid
1/ Use the import patron tool to update this userid
=> userid should have been updated
2/ Update another data and do not provide the userid
=> data should have been updated and not the userid
3/ Update another data and provide the userid, but set it to an empty
string, or '0'
=> data should have been updated and not the userid
4/ Update another patron, and set userid=your_userid
=> Update should fail and an error whouls be displayed ("already used by
another patron")

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
C4/Members.pm
koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt
tools/import_borrowers.pl