[Koha-bugs] [Bug 10454] Duplicate card numbers may be generated

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Jun 22 23:15:05 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10454

--- Comment #9 from M. Tompsett <mtompset at hotmail.com> ---
Test Plan
=========

TEST updatedatabase.pl & kohaversion.pl
=======================================
1) Apply patch.
2) Back up koha database.
-- Necessary to test empty borrowers case.
3) Upgrade the DB via staff client.
4) Confirm that there are 2 more records in cardnumber_sequence than borrowers.
-- This means that the updatedatabase.pl part of the patch works correctly when
there are borrowers.
5) Restore koha database.
6) delete all the records from the borrowers table.
7) Upgrade the DB via staff client.
8) Confirm there are only 2 records in cardnumber_sequence.
-- This means that the updatadatabase.pl part of the patch works correctly
where there are no borrowers.
-- Given that you just triggered an upgrade successfully twice, the
kohaversion.pl part of the patch works.
NOTE: Currently it is using 3.13.00.XXX as the version number. It is my
understanding that the release or maintenance manager is responsible for
changing this number.

TEST fixup_cardnumber CALLS
===========================
This function is called by the member entry (home->patrons->new patron), import
patrons (home->tools->import patrons), and opac self registration
(home->administration->system preferences->opac opacuserlogin:allow,
PatronSelfRegistration:Allow, PatronSelfRegistrationDefaultCategory: {something
from the patron categories, like PT}, then click the register button on the
login area of the OPAC client).

Member Entry
============
1) log into staff client
2) Home
3) Koha administration
4) Global system preferences
5) Patrons
6) autoMemberNum: Do, checkdigit: Don't (simple +1 sequence)
7) Save all Patrons preferences
8) Home
9) Patrons
10) New Patron (any category)
11) Note the cardnumber (you'll have to scroll down)
12) Refresh the page
13) Note the cardnumber (it should have incremented by one)
-- Yes, the generation of a big gap in the card number sequence is a known flaw
in this simplified version which has no unique process id. A gap is preferred
over duplicates.
14) Home
15) Koha administration
16) Global system preferences
17) Patrons
18) autoMemberNum: Do, checkdigit: Do (adds checkdigit, starts with 'V')
19) Save all Patrons preferences
20) Home
21) Patrons
22) New Patron (any category)
23) Note the cardnumber (you'll have to scroll down)
24) Refresh the page
25) Note the cardnumber (V#######X, the #'s should have incremented by one)
26) Repeat steps 2 through 25. The first numbers (step 11 and 23) should be the
next one of their respective types based on the last observed numbers (steps 13
and 25 from the previous iteration).

OPAC Self Registration
======================
1) log into staff client
2) Home
3) Koha administration
4) Global system preferences
5) OPAC
6) opacuserlogin:allow, PatronSelfRegistration:Allow,
PatronSelfRegistrationDefaultCategory: {something from the patron categories,
like PT}
7) Save all OPAC preferences
8) Patrons
9) autoMemberNum: Do, checkdigit: Don't (simple +1 sequence)
10) Save all Patrons preferences
12) open OPAC client
13) click the 'Register here' link.
14) Add a bogus patron
15) Check the cardnumber. It should be what is expected.
16) change the checkdigit value in Patrons to Do.
17) self register another patron in OPAC.
18) check the cardnumber. It should be what is expected for the other number
generation method.

Import Members
==============
There is an export tool in misc called export_borrowers.pl
I have not tested this, and have no idea if it would work, but using that with
a -H option, to include headers. Delete the cardnumber column. And attempt to
reimport it back into an empty borrowers tables.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list