Bug 36251 - Patron search by letter broken in holds
Summary: Patron search by letter broken in holds
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 36284 (view as bug list)
Depends on: 35329
Blocks:
  Show dependency treegraph
 
Reported: 2024-03-06 20:07 UTC by Caroline Cyr La Rose
Modified: 2024-03-13 08:08 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00
Circulation function:


Attachments
Bug 36251: (bug 35329 follow-up) Fix patron search by first letter when placing a hold (3.16 KB, patch)
2024-03-07 07:58 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36251: (bug 35329 follow-up) Fix patron search by first letter when placing a hold (3.23 KB, patch)
2024-03-07 15:08 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 36251: (bug 35329 follow-up) Fix patron search by first letter when placing a hold (3.29 KB, patch)
2024-03-11 14:18 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2024-03-06 20:07:21 UTC
When placing a hold, if you click on a letter to find the patrons whose last name starts with that letter, it shows all patrons.

To recreate:
1. In the staff interface, search for a record
2. Click Place hold
3. Click on a letter under the patron search bar (I used H)
   --> Patrons with last name starting with another letter are displayed
Comment 1 Caroline Cyr La Rose 2024-03-06 20:09:07 UTC
I tried in 23.11 and it's fine. I bisected and found it was due to bug 35329, specifically Bug 35329: Move patron search to modal - funds.
Comment 2 Jonathan Druart 2024-03-07 07:58:09 UTC
Created attachment 162861 [details] [review]
Bug 36251: (bug 35329 follow-up) Fix patron search by first letter when placing a hold

Most of the patrons searches open in a modal. Except:
* the main one (members-home)
* when placing a hold
* when requesting an article
(did I miss one?)

The patron-search.inc BLOCKs need a parent block to know where to locate
the elements (form, table, etc), because we can have several patron
searches on the same page.

Bug 35329 reused '#searchresults':
  10 [% SET search_results_block_id = 'searchresults' %]
which is used on the main patron search.
The ones in the modal are correctly handled: we build the parent node in
the "patron_search_modal" block.
But for the 2 others the parent block id is wrong.

On reserve/request.tt we have one already, so we set the TT variable from the
.tt file
On circ/request-article we don't have one already, so we can reuse
searchresults (could be more specific however to include 'patrons'...)

Test plan:
Browse patrons by first letter when placing a hold and requesting an
article
Comment 3 Caroline Cyr La Rose 2024-03-07 15:08:13 UTC
Created attachment 162906 [details] [review]
Bug 36251: (bug 35329 follow-up) Fix patron search by first letter when placing a hold

Most of the patrons searches open in a modal. Except:
* the main one (members-home)
* when placing a hold
* when requesting an article
(did I miss one?)

The patron-search.inc BLOCKs need a parent block to know where to locate
the elements (form, table, etc), because we can have several patron
searches on the same page.

Bug 35329 reused '#searchresults':
  10 [% SET search_results_block_id = 'searchresults' %]
which is used on the main patron search.
The ones in the modal are correctly handled: we build the parent node in
the "patron_search_modal" block.
But for the 2 others the parent block id is wrong.

On reserve/request.tt we have one already, so we set the TT variable from the
.tt file
On circ/request-article we don't have one already, so we can reuse
searchresults (could be more specific however to include 'patrons'...)

Test plan:
Browse patrons by first letter when placing a hold and requesting an
article

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 4 Caroline Cyr La Rose 2024-03-07 15:11:27 UTC
Thanks Jonathan!

Testing note: to test article requests, must enable ArticleRequests syspref.

1. Enable ArticleRequests system preference
2. In the staff interface, search for a record
3. Click Place hold
4. Click on a letter under the patron search bar (I used H)
   --> Should limit to patrons whose last name start with the letter
5. Go back to the record
6. Click Request Article
7. Click on a letter under the patron search bar (I used H)
   --> Should limit to patrons whose last name start with the letter
Comment 5 Katrin Fischer 2024-03-09 11:12:10 UTC
*** Bug 36284 has been marked as a duplicate of this bug. ***
Comment 6 Kyle M Hall (khall) 2024-03-11 14:18:57 UTC
Created attachment 163038 [details] [review]
Bug 36251: (bug 35329 follow-up) Fix patron search by first letter when placing a hold

Most of the patrons searches open in a modal. Except:
* the main one (members-home)
* when placing a hold
* when requesting an article
(did I miss one?)

The patron-search.inc BLOCKs need a parent block to know where to locate
the elements (form, table, etc), because we can have several patron
searches on the same page.

Bug 35329 reused '#searchresults':
  10 [% SET search_results_block_id = 'searchresults' %]
which is used on the main patron search.
The ones in the modal are correctly handled: we build the parent node in
the "patron_search_modal" block.
But for the 2 others the parent block id is wrong.

On reserve/request.tt we have one already, so we set the TT variable from the
.tt file
On circ/request-article we don't have one already, so we can reuse
searchresults (could be more specific however to include 'patrons'...)

Test plan:
Browse patrons by first letter when placing a hold and requesting an
article

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Katrin Fischer 2024-03-12 16:49:46 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 8 Fridolin Somers 2024-03-13 08:08:42 UTC
Depends on bug 35329 not in 23.11.x