[Koha-bugs] [Bug 28873] New: Incorrect age displayed in db_dependent/Koha/Patrons.t

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Aug 17 22:18:01 CEST 2021


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

            Bug ID: 28873
           Summary: Incorrect age displayed in db_dependent/Koha/Patrons.t
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Test Suite
          Assignee: chris at bigballofwax.co.nz
          Reporter: fridolin.somers at biblibre.com
        QA Contact: testopia at bugs.koha-community.org

In test suite db_dependent/Koha/Patrons.t actually shows :

# Subtest: is_valid_age
    1..10
    ok 1 - Patron with no dateofbirth is always valid for any category
    ok 2 - Today=2020-02-28, dob=2015-03-01, is 5, should be valid=0
    ok 3 - Today=2020-02-28, dob=2015-02-27, is 5, should be valid=1
    ok 4 - Today=2020-02-28, dob=2009-02-28, is 11, should be valid=0
    ok 5 - Today=2020-02-28, dob=2015-02-28, is 7, should be valid=1
    ok 6 - Today=2020-02-28, dob=2009-02-27, is 11, should be valid=0
    ok 7 - Today=2020-02-28, dob=2016-08-27, is 3, should be valid=0
    ok 8 - Today=2020-02-28, dob=2009-03-01, is 11, should be valid=1
    ok 9 - Today=2020-02-28, dob=2007-08-27, is 12, should be valid=0
    ok 10 - Today=2020-02-28, dob=2015-02-28, is 5, should be valid=1

Some ages are incorrect :

1) dob=2009-03-01, is 11
=> it is age 10
so valid=1 in category 5 to 10

2) dob=2015-03-01, is 5
=> it is age 4
so valid=0 in category 5 to 10

3) dob=2015-02-28, is 7
=> this date of birth is already tested
I suppose here dob is wrong, age wanted is 7 in the middle of age restrictions.
so dob=2013-02-28

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


More information about the Koha-bugs mailing list