Summary: | Patron searches break when surname and firstname are set to NULL | ||
---|---|---|---|
Product: | Koha | Reporter: | Lucas Gass (lukeg) <lucas> |
Component: | Patrons | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | Pushed to oldstable --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | alexbuckley, david, fridolin.somers, gmcharlt, kyle.m.hall, Laura.escamilla, martin.renvoize, stalkernoid |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes an error when searching for patrons in the staff interface (for both the search in the header and the sidebar). If you have a patron without a last name or first name, and search using a space, the search did not complete and generated a browser console error.
|
Version(s) released in: |
24.11.00,24.05.06
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 38549 | ||
Attachments: |
Bug 37368: Change library.name to library_id
Bug 37368: Change library.name to library_id Bug 37368: Add 'library' to patron search embed Bug 37368: Add 'library' to patron search embed Bug 37368: Add 'library' to patron search embed Bug 37368: Add 'library' to patron search embed |
Description
Lucas Gass (lukeg)
2024-07-15 21:36:21 UTC
Created attachment 169030 [details] [review] Bug 37368: Change library.name to library_id To test: 1: update borrowers set surname = NULL where borrowernumber = 19; 2. update borrowers set firstname = NULL where borrowernumber = 19; 3. Perform a patron search, see the console error and the patron search never completes. 4. APPLY PATCH and try searching again. 5. Search completes. Sorry, I can't replicate the issue. I tried in both Firefox and Chromium: 1. Go to Patrons. 2. Use the header search box to search for a patron (for example, Mary). 3. Autocomplete comes up as expected, and patron record displays as expected. 4. No console errors. 5. Same with left-hand side "Search for patron" on the Patrons page (entered Mary then the search button). Update: I can get the console error if I enter a space in the search box and press enter, and the same with the search on the left. Created attachment 169032 [details] [review] Bug 37368: Change library.name to library_id To test: 1: update borrowers set surname = NULL where borrowernumber = 19; 2. update borrowers set firstname = NULL where borrowernumber = 19; 3. Perform a patron search, see the console error and the patron search never completes. 4. APPLY PATCH and try searching again. 5. Search completes. Signed-off-by: David Nind <david@davidnind.com> Created attachment 169093 [details] [review] Bug 37368: Add 'library' to patron search embed This patch adds the missing library embed from the patron search forms. This embed is required for the case where a patron is missing both first and last name or is from a different library group and thus falls into the 'Patron from library X' block. I also update the 'Patron from library X' to 'Patron from X' as I feel it reads more clearly. Created attachment 169095 [details] [review] Bug 37368: Add 'library' to patron search embed This patch adds the missing library embed from the patron search forms. This embed is required for the case where a patron is missing both first and last name or is from a different library group and thus falls into the 'Patron from library X' block. I also update the 'Patron from library X' to 'Patron from X' as I feel it reads more clearly. Finally, we need to sync the available embeds to ensure 'library' is embeddable from the different endpoints this search can be triggered on. Created attachment 169096 [details] [review] Bug 37368: Add 'library' to patron search embed This patch adds the missing library embed from the patron search forms. This embed is required for the case where a patron is missing both first and last name or is from a different library group and thus falls into the 'Patron from library X' block. I also update the 'Patron from library X' to 'Patron from X' as I feel it reads more clearly. Finally, we need to sync the available embeds to ensure 'library' is embeddable from the different endpoints this search can be triggered on. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 169106 [details] [review] Bug 37368: Add 'library' to patron search embed This patch adds the missing library embed from the patron search forms. This embed is required for the case where a patron is missing both first and last name or is from a different library group and thus falls into the 'Patron from library X' block. I also update the 'Patron from library X' to 'Patron from X' as I feel it reads more clearly. Finally, we need to sync the available embeds to ensure 'library' is embeddable from the different endpoints this search can be triggered on. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed for 24.11! Well done everyone, thank you! *** Bug 37327 has been marked as a duplicate of this bug. *** Hi everyone, We have found this bug is happening on earlier Koha versions including 24.05. Please can this fix be backported to 24.05 and 23.11? Thanks, Alex Backported to 24.05.x for upcoming 24.05.06 (In reply to Lucas Gass (lukeg) from comment #12) > Backported to 24.05.x for upcoming 24.05.06 Thank you very much for backporting. Does not apply on 23.11.x looks like because of Bug 33568 Please provide rebased patch if you can |