Bug 38188

Summary: Fix populating borrowernumberslist from patron_search_selections
Product: Koha Reporter: Johanna Räisä <johanna.raisa>
Component: PatronsAssignee: Johanna Räisä <johanna.raisa>
Status: RESOLVED FIXED QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, jesse, kyle.m.hall, lucas, martin.renvoize, mspinney
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06,23.11.11
Circulation function:
Attachments: Bug 38188: fix populating the borrowenumberlist from patron_search_selections
Bug 38188: fix populating the borrowenumberlist from patron_search_selections
Bug 38188: fix populating the borrowenumberlist from patron_search_selections

Description Johanna Räisä 2024-10-17 06:12:24 UTC
On patron search page populating the borrowernumberlist for batch patron modification is working randomly, the textarea is not getting the borrowernumbers everytime. 

In the code the textarea is populated with html() function, which usually used to get/set html elements. There should be a val() function which is used for setting values into form elements such as textarea.
Comment 1 Johanna Räisä 2024-10-17 06:32:37 UTC
Created attachment 172835 [details] [review]
Bug 38188: fix populating the borrowenumberlist from  patron_search_selections

This patch fixes the issue of populating the borrowernumberlist from patron_search_selections.
Adding borrowernumbers to the textarea randomly fails because the textarea is populated with the html() function.

To test:
1) Go to the patron search
2) Select a few patrons
3) Click on the "Batch patron modification" button
4) Use browsers back button to go back to the patron search
5) Find patron_batchmod_form from browser inspector, open it.
6) Check that between the <textarea> tags, there are the borrowernumbers of the selected patrons.
7) Apply the patch
8) Repeat steps 1-6
9) Check that <textarea> tags are not populated with the borrowernumbers of the selected patrons.
10) Remove the display:none from the textarea and check that the borrowernumbers are populated there.

Sponsored-by: Koha-Suomi Oy
Comment 2 PTFS Europe Sandboxes 2024-10-17 23:43:54 UTC
Created attachment 172935 [details] [review]
Bug 38188: fix populating the borrowenumberlist from patron_search_selections

This patch fixes the issue of populating the borrowernumberlist from patron_search_selections.
Adding borrowernumbers to the textarea randomly fails because the textarea is populated with the html() function.

To test:
1) Go to the patron search
2) Select a few patrons
3) Click on the "Batch patron modification" button
4) Use browsers back button to go back to the patron search
5) Find patron_batchmod_form from browser inspector, open it.
6) Check that between the <textarea> tags, there are the borrowernumbers of the selected patrons.
7) Apply the patch
8) Repeat steps 1-6
9) Check that <textarea> tags are not populated with the borrowernumbers of the selected patrons.
10) Remove the display:none from the textarea and check that the borrowernumbers are populated there.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Comment 3 Martin Renvoize (ashimema) 2024-10-28 10:49:00 UTC
Created attachment 173506 [details] [review]
Bug 38188: fix populating the borrowenumberlist from patron_search_selections

This patch fixes the issue of populating the borrowernumberlist from patron_search_selections.
Adding borrowernumbers to the textarea randomly fails because the textarea is populated with the html() function.

To test:
1) Go to the patron search
2) Select a few patrons
3) Click on the "Batch patron modification" button
4) Use browsers back button to go back to the patron search
5) Find patron_batchmod_form from browser inspector, open it.
6) Check that between the <textarea> tags, there are the borrowernumbers of the selected patrons.
7) Apply the patch
8) Repeat steps 1-6
9) Check that <textarea> tags are not populated with the borrowernumbers of the selected patrons.
10) Remove the display:none from the textarea and check that the borrowernumbers are populated there.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Katrin Fischer 2024-10-29 07:54:37 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 5 Lucas Gass (lukeg) 2024-11-22 21:25:53 UTC
Backported to 24.05.x for upcoming 24.05.06
Comment 6 Fridolin Somers 2024-12-13 15:29:22 UTC
Pushed to 23.11.x for 23.11.11
Comment 7 Jesse Maseto 2025-02-03 16:47:08 UTC
Not pushed to LTS. Marked Resolved.

If you feel this should be in LTS please reply with your reason.