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: Signed Off --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, 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:
Circulation function:
Attachments: 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>