[Bug 28873] New: Incorrect age displayed in db_dependent/Koha/Patrons.t
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@bigballofwax.co.nz Reporter: fridolin.somers@biblibre.com QA Contact: testopia@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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28873 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |fridolin.somers@biblibre.co | |m Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28873 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28873 --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 123914 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123914&action=edit Bug 28873: Fix age displayed in db_dependent/Koha/Patrons.t In test suite db_dependent/Koha/Patrons.t actually shows : 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 This patch fixes ages. Also adds the category code 'AGE_5_10' in messages to display age limits Test plan : Run prove -v t/db_dependent/Koha/Patrons.t without and with patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28873 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28873 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123914|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 123915 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123915&action=edit Bug 28873: Fix age displayed in db_dependent/Koha/Patrons.t In test suite db_dependent/Koha/Patrons.t actually shows : 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 This patch fixes ages. Also adds the category code 'AGE_5_10' in messages to display age limits Test plan : Run prove -v t/db_dependent/Koha/Patrons.t without and with patch Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28873 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Testing notes (koha-testing-docker): - Look for test 19 - is_valid_age -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28873 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28873 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123915|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 123916 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123916&action=edit Bug 28873: Fix age displayed in db_dependent/Koha/Patrons.t In test suite db_dependent/Koha/Patrons.t actually shows : 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 This patch fixes ages. Also adds the category code 'AGE_5_10' in messages to display age limits Test plan : Run prove -v t/db_dependent/Koha/Patrons.t without and with patch Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28873 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28873 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28873 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.11.00 |21.11.00,21.05.03 released in| | CC| |kyle@bywatersolutions.com --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28873 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes age tests in release notes| |t/db_dependent/Koha/Patrons | |.t so that the correct | |ages are calculated and | |displayed. It also adds the | |category code 'AGE_5_10' in | |messages to display age | |limits. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28873 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28873 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.11.00,21.05.03 |21.11.00,21.05.03,20.11.10 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28873 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org