Bug 30628 - Batch borrower modifications only affect the current page
Summary: Batch borrower modifications only affect the current page
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords: rel_21_05_candidate, rel_21_11_candidate
Depends on: 28014
Blocks:
  Show dependency treegraph
 
Reported: 2022-04-27 12:12 UTC by Nick Clemens
Modified: 2022-06-23 13:35 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact: Martin Renvoize
Documentation submission:
Text to go in the release notes:
This fixes the batch patron modification tool (Tools > Patrons and circulation > Batch patron modification) so that the changes for all selected patrons are modified. Before this, only the patrons listed on the current page were modified.
Version(s) released in:
22.05.00,21.11.06,21.05.16


Attachments
Bug 30628: Fix patron selection in batch patron modification tool (2.53 KB, patch)
2022-04-28 08:35 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30628: Fix patron selection in batch patron modification tool (2.58 KB, patch)
2022-04-28 10:45 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 30628: Fix patron selection in batch patron modification tool (2.64 KB, patch)
2022-04-28 16:46 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2022-04-27 12:12:21 UTC
To recreate:
1 - Get a list of more than 20 cardnumbers:
    SELECT cardnumber FROM borrowers LIMIT 50
2 - Enter those cardnumbers into 'Tools-> Batch patron modification' 
3 - Add a circulation note 'THIS IS A TEST'
4 - Save
5 - Note results screen has only 20 entries
6 - Confirm only 20 patrons affected
Comment 1 Katrin Fischer 2022-04-27 12:26:58 UTC
It's noted on the reports page, that you only send to the batch tools what's currently visible - is that the issue you are seeing?
Comment 2 Nick Clemens 2022-04-27 13:11:56 UTC
No, the issue is happening in the batch modification itself
Comment 3 Jonathan Druart 2022-04-28 08:35:24 UTC
Created attachment 134205 [details] [review]
Bug 30628: Fix patron selection in batch patron modification tool

bug 28014 added Datatables to this view, but the form is submitted with
only the checkboxes from the first page.

Solution adapted from https://stackoverflow.com/questions/33240409/how-to-submit-checkboxes-from-all-pages-with-jquery-datatables

Test plan:
Have more than 20 cardnumbers, use the batch patron modification tool
Select (not all) patrons from the first page and second page
Submit the form
Notice that the patrons you have selected appear on the confirmation
page.
Comment 4 Nick Clemens 2022-04-28 10:45:26 UTC
Created attachment 134220 [details] [review]
Bug 30628: Fix patron selection in batch patron modification tool

bug 28014 added Datatables to this view, but the form is submitted with
only the checkboxes from the first page.

Solution adapted from https://stackoverflow.com/questions/33240409/how-to-submit-checkboxes-from-all-pages-with-jquery-datatables

Test plan:
Have more than 20 cardnumbers, use the batch patron modification tool
Select (not all) patrons from the first page and second page
Submit the form
Notice that the patrons you have selected appear on the confirmation
page.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Katrin Fischer 2022-04-28 16:46:57 UTC
Created attachment 134286 [details] [review]
Bug 30628: Fix patron selection in batch patron modification tool

bug 28014 added Datatables to this view, but the form is submitted with
only the checkboxes from the first page.

Solution adapted from https://stackoverflow.com/questions/33240409/how-to-submit-checkboxes-from-all-pages-with-jquery-datatables

Test plan:
Have more than 20 cardnumbers, use the batch patron modification tool
Select (not all) patrons from the first page and second page
Submit the form
Notice that the patrons you have selected appear on the confirmation
page.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Fridolin Somers 2022-05-02 21:26:00 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 7 Kyle M Hall 2022-05-13 15:53:58 UTC
Pushed to 21.11.x for 21.11.06
Comment 8 Victor Grousset/tuxayo 2022-06-23 01:53:17 UTC
Backported: Pushed to 21.05.x branch for 21.05.16
Comment 9 Martin Renvoize 2022-06-23 13:35:31 UTC
Bugfix with not visual or workflow change. No documentation changes needed.