[Bug 26311] New: Add patron invalid age to search_for_data_inconsistencies.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Bug ID: 26311 Summary: Add patron invalid age to search_for_data_inconsistencies.pl Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz Patron categories may have age limits. Add to script misc/maintenance/search_for_data_inconsistencies.pl the list of patrons which age is invalid regarding there category. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26307 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m Status|NEW |ASSIGNED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 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=26311 --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 109239 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109239&action=edit Bug 26311: Add patron invalid age to search_for_data_inconsistencies.pl Patron categories may have age limits. Add to script misc/maintenance/search_for_data_inconsistencies.pl the list of patrons which age is invalid regarding there category. Test plan : 1) Create an adult patron category limited to 18-99 years 2) Create a patron in the category 3) Edit in database its date of birth so that he is 17 years old 4) Run misc/maintenance/search_for_data_inconsistencies.pl => You see the patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Owen Leonard <oleonard@myacpl.org> 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=26311 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #109239|0 |1 is obsolete| | --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 110106 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110106&action=edit Bug 26311: Add patron invalid age to search_for_data_inconsistencies.pl Patron categories may have age limits. Add to script misc/maintenance/search_for_data_inconsistencies.pl the list of patrons which age is invalid regarding there category. Test plan : 1) Create an adult patron category limited to 18-99 years 2) Create a patron in the category 3) Edit in database its date of birth so that he is 17 years old 4) Run misc/maintenance/search_for_data_inconsistencies.pl => You see the patron Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 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=26311 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110106|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 110130 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110130&action=edit Bug 26311: Add patron invalid age to search_for_data_inconsistencies.pl Patron categories may have age limits. Add to script misc/maintenance/search_for_data_inconsistencies.pl the list of patrons which age is invalid regarding there category. Test plan : 1) Create an adult patron category limited to 18-99 years 2) Create a patron in the category 3) Edit in database its date of birth so that he is 17 years old 4) Run misc/maintenance/search_for_data_inconsistencies.pl => You see the patron Signed-off-by: Owen Leonard <oleonard@myacpl.org> 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=26311 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 110131 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110131&action=edit Bug 26311: (QA follow-up) Rephrase output message This is a suggestion for rephrasing the message slightly: Before: * Patron borrowernumber=15 in category 'J' has invalid age '56' After: * Patron borrowernumber=37 has an invalid age of 37 for their category 'K' 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=26311 --- Comment #5 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Katrin Fischer from comment #4)
Created attachment 110131 [details] [review] Bug 26311: (QA follow-up) Rephrase output message
This is a suggestion for rephrasing the message slightly:
Before: * Patron borrowernumber=15 in category 'J' has invalid age '56'
After: * Patron borrowernumber=37 has an invalid age of 37 for their category 'K'
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Yep better thanks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I am wondering if we could not improve this a bit. 1. We could retrieve patrons with a dob 2. We could retrieve patrons from categories with dateofbirthrequired Looping on all patrons does not seem very efficient. What do you think? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 --- Comment #7 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Jonathan Druart from comment #6) I like calling $patron->is_valid_age so its the same behaviour as staff interface.
Looping on all patrons does not seem very efficient. I agree but actually script is looping on all biblio records, which already can be very long.
But I'm open to changes ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think having a dob makes sense, because it's won't work otherwise, but I would not rely on dob required. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #9 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #6)
I am wondering if we could not improve this a bit. 1. We could retrieve patrons with a dob 2. We could retrieve patrons from categories with dateofbirthrequired
Looping on all patrons does not seem very efficient.
What do you think?
I agree about improving efficiency. Why not loop through the patron categories that have age limits, and then only retrieve the patrons for those categories? Depending on how inconsistencies want to be reported, you could then note patrons with null dateofbirth, or only select patrons where their dateofbirth is outside the allowed scope. Much better than looping through all patrons I think. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 --- Comment #10 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 110978 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110978&action=edit Bug 26311: Loop through the patron with date of birth and in categories having age limits Also added category limits in message, for example (12-18) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 --- Comment #11 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 110979 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110979&action=edit Bug 26311: (follow-up) loop through the patron with date of birth and in categories having age limits Also added category limits in message, for example (12-18) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff --- Comment #12 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Good points. Here is a follow-up that limits on patrons : - having a Date Of Birth - in category having an age limit Patrons search is quite complex so tell me if its the correct syntax. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110978|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110979|0 |1 is obsolete| | --- Comment #13 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 110980 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110980&action=edit Bug 26311: (follow-up) loop through the patron with date of birth and in categories having age limits Also added category limits in message, for example (12-18) Check patron : - with no date of birth - with invalid age in category having age required - with invalid age in category having upper age limit - with invalid age in category having age required and upper age limit -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 --- Comment #14 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Oh I changed 'thier category' to 'his category'. I understand now its wrong = gender neutral pronoun I repush -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110980|0 |1 is obsolete| | --- Comment #15 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 110998 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110998&action=edit Bug 26311: (follow-up) loop through the patron with date of birth and in categories having age limits Also added category limits in message, for example (12-18) Check patron : - with no date of birth - with invalid age in category having age required - with invalid age in category having upper age limit - with invalid age in category having age required and upper age limit -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Séverine Queune <severine.queune@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |severine.queune@bulac.fr --- Comment #16 from Séverine Queune <severine.queune@bulac.fr> --- No problem pllying the patchs, but I don't have any alert in the script. Maybe the problem comes from my side, I prefer not updating the status and let someone else try. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110130|0 |1 is obsolete| | --- Comment #17 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 128235 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128235&action=edit Bug 26311: Add patron invalid age to search_for_data_inconsistencies.pl Patron categories may have age limits. Add to script misc/maintenance/search_for_data_inconsistencies.pl the list of patrons which age is invalid regarding there category. Test plan : 1) Create an adult patron category limited to 18-99 years 2) Create a patron in the category 3) Edit in database its date of birth so that he is 17 years old 4) Run misc/maintenance/search_for_data_inconsistencies.pl => You see the patron Signed-off-by: Owen Leonard <oleonard@myacpl.org> 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=26311 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110131|0 |1 is obsolete| | --- Comment #18 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 128236 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128236&action=edit Bug 26311: (QA follow-up) Rephrase output message This is a suggestion for rephrasing the message slightly: Before: * Patron borrowernumber=15 in category 'J' has invalid age '56' After: * Patron borrowernumber=37 has an invalid age of 37 for their category 'K' 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=26311 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110998|0 |1 is obsolete| | --- Comment #19 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 128237 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128237&action=edit Bug 26311: (follow-up) loop through the patron with date of birth and in categories having age limits Also added category limits in message, for example (12-18) Check patron : - with no date of birth - with invalid age in category having age required - with invalid age in category having upper age limit - with invalid age in category having age required and upper age limit -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |david@davidnind.com --- Comment #20 from David Nind <david@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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|Trivial patch |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 --- Comment #21 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 131295 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131295&action=edit Bug 26311: Add patron invalid age to search_for_data_inconsistencies.pl Patron categories may have age limits. Add to script misc/maintenance/search_for_data_inconsistencies.pl the list of patrons which age is invalid regarding there category. Test plan : 1) Create an adult patron category limited to 18-99 years 2) Create a patron in the category 3) Edit in database its date of birth so that he is 17 years old 4) Run misc/maintenance/search_for_data_inconsistencies.pl => You see the patron Signed-off-by: Owen Leonard <oleonard@myacpl.org> 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=26311 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128236|0 |1 is obsolete| | --- Comment #22 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 131296 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131296&action=edit Bug 26311: (QA follow-up) Rephrase output message This is a suggestion for rephrasing the message slightly: Before: * Patron borrowernumber=15 in category 'J' has invalid age '56' After: * Patron borrowernumber=37 has an invalid age of 37 for their category 'K' 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=26311 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128237|0 |1 is obsolete| | --- Comment #23 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 131297 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131297&action=edit Bug 26311: (follow-up) loop through the patron with date of birth and in categories having age limits Also added category limits in message, for example (12-18) Check patron : - with no date of birth - with invalid age in category having age required - with invalid age in category having upper age limit - with invalid age in category having age required and upper age limit -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128235|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 --- Comment #24 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to David Nind from comment #20)
Testing notes and issues identified (using koha-testing-docker): Thanks a lot for testing David. I've found an error in patrons select. Fixed with prefetch of patron category.
You may test again -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 --- Comment #25 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 132978 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132978&action=edit Bug 30063: Fix missing TT filters Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132978|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #26 from David Nind <david@davidnind.com> --- Apologies that it has taken me so long to retest. Summary from testing: - test plan for first patch: worked as expected - with no date of birth: does not appear in the list, no warnings on the patron page in staff interface [1] - with invalid age in category having age required: unitilized value message if upper age limit blank [2] - with invalid age in category having upper age limit: unitilized value message if upper age limit blank [3] - with invalid age in category having age required and upper age limit: works as expected Hopefully I haven't misinterpreted what is expected here! [1] with no date of birth ~~~~~~~~~~~~~~~~~~~~~~~~~ 1. Edited a staff patron (Henry: patron id = 19) and removed date of birth using the staff interface (dateofbirth shows as NULL in database) 2. Changed the staff patron category (S) so age required = 18-99 years 3. Does not appear in the list after running the script [2] with invalid age in category having age required ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. Edited a patron (Mary Burton - borrowernumber = 49) so that age is less than 24. 2. Changed patron category (PT) so age required = 24 and no maximum age (left blank). 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 304. * Patron borrowernumber=49 has an invalid age of 21 for their category 'PT' (24-) 4. If they have the correct age (changed so they were older than 24), then no unitialized value message [3] 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 304. * Patron borrowernumber=49 has an invalid age of 58 for their category 'PT' (-50) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131295|0 |1 is obsolete| | --- Comment #27 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 136665 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136665&action=edit Bug 26311: Add patron invalid age to search_for_data_inconsistencies.pl Patron categories may have age limits. Add to script misc/maintenance/search_for_data_inconsistencies.pl the list of patrons which age is invalid regarding there category. Test plan : 1) Create an adult patron category limited to 18-99 years 2) Create a patron in the category 3) Edit in database its date of birth so that he is 17 years old 4) Run misc/maintenance/search_for_data_inconsistencies.pl => You see the patron Signed-off-by: Owen Leonard <oleonard@myacpl.org> 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=26311 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131296|0 |1 is obsolete| | --- Comment #28 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 136666 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136666&action=edit Bug 26311: (QA follow-up) Rephrase output message This is a suggestion for rephrasing the message slightly: Before: * Patron borrowernumber=15 in category 'J' has invalid age '56' After: * Patron borrowernumber=37 has an invalid age of 37 for their category 'K' 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=26311 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131297|0 |1 is obsolete| | --- Comment #29 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 136667 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136667&action=edit Bug 26311: (follow-up) loop through the patron with date of birth and in categories having age limits Also added category limits in message, for example (12-18) Check patron : - with no date of birth - with invalid age in category having age required - with invalid age in category having upper age limit - with invalid age in category having age required and upper age limit -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 --- Comment #30 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 136668 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136668&action=edit Bug 26311: (follow-up) Fix undefined values in sprintf Avoid warns 'Use of uninitialized value in sprintf' by using '0' if lower age is undefined 'unlimited' if upper are is undefined -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 --- Comment #31 from Fridolin Somers <fridolin.somers@biblibre.com> --- Warns uninitialized value in sprintf removed. Thanks again for testing David :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 --- Comment #32 from David Nind <david@davidnind.com> --- (In reply to Fridolin Somers from comment #31)
Warns uninitialized value in sprintf removed.
Thanks Fridolin - the warnings are now removed and things work as expected. The only thing that's not working for me is when the date of birth is empty. Is this supposed to show in the list of data inconsistencies? For example, if a patron has no date of birth but is in the patron category with an age range from 18-99, then I would expect it to show - as there is no way to know how old they are. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 --- Comment #33 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to David Nind from comment #32)
(In reply to Fridolin Somers from comment #31)
Warns uninitialized value in sprintf removed.
Thanks Fridolin - the warnings are now removed and things work as expected.
The only thing that's not working for me is when the date of birth is empty.
Is this supposed to show in the list of data inconsistencies? For example, if a patron has no date of birth but is in the patron category with an age range from 18-99, then I would expect it to show - as there is no way to know how old they are.
Hi We decided in comment 6 to skip patron with no date of birth. So indeed they do not show in list of data inconsistencies. Some patron can be a virtual person (like a school) so no date of birth. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 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=26311 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136665|0 |1 is obsolete| | --- Comment #34 from David Nind <david@davidnind.com> --- Created attachment 136750 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136750&action=edit Bug 26311: Add patron invalid age to search_for_data_inconsistencies.pl Patron categories may have age limits. Add to script misc/maintenance/search_for_data_inconsistencies.pl the list of patrons which age is invalid regarding there category. Test plan : 1) Create an adult patron category limited to 18-99 years 2) Create a patron in the category 3) Edit in database its date of birth so that he is 17 years old 4) Run misc/maintenance/search_for_data_inconsistencies.pl => You see the patron Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> 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=26311 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136666|0 |1 is obsolete| | --- Comment #35 from David Nind <david@davidnind.com> --- Created attachment 136751 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136751&action=edit Bug 26311: (QA follow-up) Rephrase output message This is a suggestion for rephrasing the message slightly: Before: * Patron borrowernumber=15 in category 'J' has invalid age '56' After: * Patron borrowernumber=37 has an invalid age of 37 for their category 'K' Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> 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=26311 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136667|0 |1 is obsolete| | --- Comment #36 from David Nind <david@davidnind.com> --- Created attachment 136752 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136752&action=edit Bug 26311: (follow-up) loop through the patron with date of birth and in categories having age limits Also added category limits in message, for example (12-18) Check patron : - with no date of birth - with invalid age in category having age required - with invalid age in category having upper age limit - with invalid age in category having age required and upper age limit 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=26311 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136668|0 |1 is obsolete| | --- Comment #37 from David Nind <david@davidnind.com> --- Created attachment 136753 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136753&action=edit Bug 26311: (follow-up) Fix undefined values in sprintf Avoid warns 'Use of uninitialized value in sprintf' by using '0' if lower age is undefined 'unlimited' if upper are is undefined 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=26311 --- Comment #38 from David Nind <david@davidnind.com> --- (In reply to Fridolin Somers from comment #33)
We decided in comment 6 to skip patron with no date of birth. So indeed they do not show in list of data inconsistencies. Some patron can be a virtual person (like a school) so no date of birth.
I didn't see that, and that makes sense. Now signed-off! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 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=26311 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136750|0 |1 is obsolete| | --- Comment #39 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 137039 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137039&action=edit Bug 26311: Add patron invalid age to search_for_data_inconsistencies.pl Patron categories may have age limits. Add to script misc/maintenance/search_for_data_inconsistencies.pl the list of patrons which age is invalid regarding there category. Test plan : 1) Create an adult patron category limited to 18-99 years 2) Create a patron in the category 3) Edit in database its date of birth so that he is 17 years old 4) Run misc/maintenance/search_for_data_inconsistencies.pl => You see the patron Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> 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=26311 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136751|0 |1 is obsolete| | --- Comment #40 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 137040 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137040&action=edit Bug 26311: (QA follow-up) Rephrase output message This is a suggestion for rephrasing the message slightly: Before: * Patron borrowernumber=15 in category 'J' has invalid age '56' After: * Patron borrowernumber=37 has an invalid age of 37 for their category 'K' Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> 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=26311 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136752|0 |1 is obsolete| | --- Comment #41 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 137041 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137041&action=edit Bug 26311: (follow-up) loop through the patron with date of birth and in categories having age limits Also added category limits in message, for example (12-18) Check patron : - with no date of birth - with invalid age in category having age required - with invalid age in category having upper age limit - with invalid age in category having age required and upper age limit 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=26311 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136753|0 |1 is obsolete| | --- Comment #42 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 137042 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137042&action=edit Bug 26311: (follow-up) Fix undefined values in sprintf Avoid warns 'Use of uninitialized value in sprintf' by using '0' if lower age is undefined 'unlimited' if upper are is undefined 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=26311 --- Comment #43 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 137043 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137043&action=edit Bug 26311: (QA follow-up) Update script documentation 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=26311 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement to the release notes| |command line script used | |for searching for data | |inconsistencies | |(misc/maintenance/search_fo | |r_data_inconsistencies.pl) | |now lists patrons where | |their age doesn't match the | |criteria set for the patron | |category. | | | |This includes | |where there is: | |- a minimum | |age required | |- an upper age | |limit | |- a minimum age and | |an upper age limit | | | |An | |example of the output: | | | | | |Patrons with invalid age | |for category: | | * Patron | |borrowernumber=49 has an | |invalid age of 10 for their | |category 'PT' (24-) | | * | |Patron borrowernumber=49 | |has an invalid age of 71 | |for their category 'PT' | |(-50) | | * Patron | |borrowernumber=44 has an | |invalid age of 70 for their | |category 'PT' (20-60) | | | |Note: Where a patron's age | |can't be calculated (for | |example: a school or other | |organisation, or the date | |of birth is missing), then | |they are not included in | |the checks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.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=26311 --- Comment #44 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This enhancement to the |This enhancement to the release notes|command line script used |command line script used |for searching for data |for searching for data |inconsistencies |inconsistencies |(misc/maintenance/search_fo |(misc/maintenance/search_fo |r_data_inconsistencies.pl) |r_data_inconsistencies.pl) |now lists patrons where |now lists patrons where |their age doesn't match the |their age doesn't match the |criteria set for the patron |criteria set for the patron |category. |category. | | |This includes |This includes |where there is: |where there is: |- a minimum |- a minimum |age required |age required |- an upper age |- an upper age |limit |limit |- a minimum age and |- a minimum age and |an upper age limit |an upper age limit | | |An |An |example of the output: |example of the output: | | | | |Patrons with invalid age |Patrons with invalid age |for category: |for category: | * Patron | * Patron |borrowernumber=49 has an |borrowernumber=49 has an |invalid age of 10 for their |invalid age of 10 for their |category 'PT' (24-) |category 'PT' (24 to | * |unlimited) |Patron borrowernumber=49 | * Patron |has an invalid age of 71 |borrowernumber=49 has an |for their category 'PT' |invalid age of 71 for their |(-50) |category 'PT' (0 to 50) | * Patron | * |borrowernumber=44 has an |Patron borrowernumber=44 |invalid age of 70 for their |has an invalid age of 70 |category 'PT' (20-60) |for their category 'PT' (20 | |to 60) |Note: Where a patron's age | |can't be calculated (for |Note: Where a |example: a school or other |patron's age can't be |organisation, or the date |calculated (for example: a |of birth is missing), then |school or other |they are not included in |organisation, or the date |the checks. |of birth is missing), then | |they are not included in | |the checks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Needs documenting CC| |lucas@bywatersolutions.com --- Comment #45 from Lucas Gass <lucas@bywatersolutions.com> --- Enhancement will not be backported to 22.05.x series -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |caroline.cyr-la-rose@inlibr | |o.com Status|Needs documenting |RESOLVED Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/680 Documentation| |Caroline Cyr La Rose contact| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26311 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34505 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34505 [Bug 34505] Patron invalid age in search_for_data_inconsistencies.pl should skip expired patrons -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org