Bug 38188 - Fix populating borrowernumberslist from patron_search_selections
Summary: Fix populating borrowernumberslist from patron_search_selections
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Johanna Räisä
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-17 06:12 UTC by Johanna Räisä
Modified: 2024-10-17 23:44 UTC (History)
3 users (show)

See Also:
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 (1.97 KB, patch)
2024-10-17 06:32 UTC, Johanna Räisä
Details | Diff | Splinter Review
Bug 38188: fix populating the borrowenumberlist from patron_search_selections (2.03 KB, patch)
2024-10-17 23:43 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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>