[Koha-bugs] [Bug 26311] Add patron invalid age to search_for_data_inconsistencies.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Dec 4 03:10:55 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA
                 CC|                            |david at davidnind.com

--- Comment #20 from David Nind <david at davidnind.com> ---
Testing notes and issues identified (using koha-testing-docker):

1. Database query for step 3: update borrowers set dateofbirth = '2004-11-01'
where borrowernumber = 49;

2. Main patch test plan worked as expected.

3. Had issues with some of the tests in the third patch (see details below),
others worked as expected:
   . with no date of birth: doesn't seem to work if age is NULL
   . with invalid age in category having age required: 'Use of uninitialized
value in sprintf...' message
   . with invalid age in category having upper age limit: 'Use of uninitialized
value in sprintf...' message

with no date of birth
~~~~~~~~~~~~~~~~~~~~~

1. Edited a staff patron (Henry - 34) and removed date of birth
2. Changed the staff patron category (S) so age required = 18-99 years
3. Error message after running (note: dateofbirth is NULL in database):
   => Patron borrowernumber=34 has an invalid age of 104 for their category 'S'
(18-99)
   => This looks wrong to me - with no date of birth I'm not sure how it works
out they 104 years of age
4. If I update in the database so dateofbirth = '' (which becomes 0000-00-00) I
get this message:
   ==> Can't call method "strftime" on an undefined value at
/kohadevbox/koha/Koha/Patron.pm line 1149.

with invalid age in category having age required
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. Edited a patron (Mary Burton - 49) so that age is less than 24.
2. Changed patron category (PT) so age required = 24 and no maximum age.
3. Worked as expected except for 'Use of unitialized value...' message:
   ==> Use of uninitialized value in sprintf at
misc/maintenance/search_for_data_inconsistencies.pl line 256.
         * Patron borrowernumber=49 has an invalid age of 10 for their category
'PT' (24-)
4. If they have the correct age (changed so they were older than 24)

with invalid age in category having upper age limit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. Edited a patron (Mary Burton - 49) so that age is more than 50.
2. Changed patron category (PT) so that no age required and upper age limit was
50.
3. Output as expected except for 'Use of uninitialized value in sprintf...'
message:
   ==> Use of uninitialized value in sprintf at
misc/maintenance/search_for_data_inconsistencies.pl line 256.
         * Patron borrowernumber=49 has an invalid age of 71 for their category
'PT' (-50)

with invalid age in category having age required and upper age limit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. Edited a patron (Mary Burton - 49) so that age is more than 60.
2. Changed patron category (PT) so that age required = 20 and upper age limit =
60.
3. Output as expected:
   ==> * Patron borrowernumber=44 has an invalid age of 70 for their category
'PT' (20-60)

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


More information about the Koha-bugs mailing list