Summary: | Patron auto-complete search explodes when dateexpiry is NULL | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Patrons | Assignee: | Lucas Gass (lukeg) <lucas> |
Status: | RESOLVED DUPLICATE | QA Contact: | Aleisha Amohia <aleisha> |
Severity: | normal | ||
Priority: | P5 - low | CC: | aleisha, david, gmcharlt, jonathan.druart, kyle.m.hall, lucas, pedro.amorim |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31143 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes patron autocomplete searching so that it continues to work if there are patron accounts without an account expiry date, instead of failing. This could happen because of incorrect data, including from migration or previous upgrades - Koha now expects a date, where it may not have in the past.
|
Version(s) released in: | |
Circulation function: | |||
Bug Depends on: | 36454 | ||
Bug Blocks: | |||
Attachments: |
Bug 38254: Treat NULL dateexpity as not expired in patron autocomplete
Bug 38254: Treat NULL dateexpity as not expired in patron autocomplete Bug 38254: Treat NULL dateexpiry as not expired in patron autocomplete |
Description
Katrin Fischer
2024-10-24 09:13:52 UTC
Created attachment 174632 [details] [review] Bug 38254: Treat NULL dateexpity as not expired in patron autocomplete To test: 1. Add some NULL patron dateexpiry dates. 2. Make sure PatronAutoComplete is on. 3. Try searching for some patrons with NULL patron dateexpiry dates. 4. Search doesn't complete, see JS error in console. 5. APPLY PATCH and try again 6. Now NULL dateexpiry patrons should be returned in the autocomplete. 7. Make sure patrons with dateexpiry in past still show the 'Expired' badge. 8. Patrons with a dateexpiry in the future or a NULL dateexpiry should not shhow the 'Expired' badge. Created attachment 174633 [details] [review] Bug 38254: Treat NULL dateexpity as not expired in patron autocomplete To test: 1. Add some NULL patron dateexpiry dates. 2. Make sure PatronAutoComplete is on. 3. Try searching for some patrons with NULL patron dateexpiry dates. 4. Search doesn't complete, see JS error in console. 5. APPLY PATCH and try again 6. Now NULL dateexpiry patrons should be returned in the autocomplete. 7. Make sure patrons with dateexpiry in past still show the 'Expired' badge. 8. Patrons with a dateexpiry in the future or a NULL dateexpiry should not shhow the 'Expired' badge. Signed-off-by: David Nind <david@davidnind.com> Testing notes (using KTD): 1. For step 1, I used this SQL query to update the expiry date for Mary to NULL: update borrowers set dateexpiry=NULL where borrowernumber=49; 2. PatronAutoComplete is already set to "Try" in KTD. 3. To see the 'Expired' badge, edit Mary's acccount so that 'Expiry date' is blank, then do a search in the search bar at the top. Created attachment 174653 [details] [review] Bug 38254: Treat NULL dateexpiry as not expired in patron autocomplete To test: 1. Add some NULL patron dateexpiry dates. 2. Make sure PatronAutoComplete is on. 3. Try searching for some patrons with NULL patron dateexpiry dates. 4. Search doesn't complete, see JS error in console. 5. APPLY PATCH and try again 6. Now NULL dateexpiry patrons should be returned in the autocomplete. 7. Make sure patrons with dateexpiry in past still show the 'Expired' badge. 8. Patrons with a dateexpiry in the future or a NULL dateexpiry should not shhow the 'Expired' badge. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Don't push, wait a bit. I don't understand why you would need this in 24.05, it's caused by bug 36454 only in main. Waiting to push this as we have some ongoing work on the same code on bug 36454. (In reply to Katrin Fischer from comment #7) > Waiting to push this as we have some ongoing work on the same code on bug > 36454. The follow-up from bug 36454: https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=36454&attachment=174671 Fixes/prevents the issue described here. (In reply to Pedro Amorim from comment #8) > (In reply to Katrin Fischer from comment #7) > > Waiting to push this as we have some ongoing work on the same code on bug > > 36454. > > The follow-up from bug 36454: > https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter. > html&bug=36454&attachment=174671 > > Fixes/prevents the issue described here. Thanks Pedro! Changing status as it's not pushed. *** This bug has been marked as a duplicate of bug 36454 *** |