Bug 20376

Summary: "Select all" button no longer selects disabled checkboxes in Batch Record Deletion Tool
Product: Koha Reporter: Maksim Sen <maksim.sen>
Component: ToolsAssignee: Maksim Sen <maksim.sen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, jonathan.druart, martin.renvoize, nick, philippe.blouin, sandboxes
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Who signed the patch off: Text to go in the release notes:
Version(s) released in:
Attachments: Bug 20376: Select all ignores disabled checkboxes
Bug 20376: Select all ignores disabled checkboxes
Bug 20376: Make select/unselect all ignore disabled checkboxes on batch record deletion

Description Maksim Sen 2018-03-12 20:04:06 UTC
This fix restricts the "Select all" (as well as the "Clear all") button from changing the "checked" status of disabled checkboxes in the Batch Record Deletion Tool.

Patch and test plan will be added shortly.
Comment 1 Maksim Sen 2018-03-12 20:24:27 UTC
Created attachment 72726 [details] [review]
Bug 20376: Select all ignores disabled checkboxes

Test Plan:

0.1 - find at least one biblionumber that has at least one item checked out
0.2 - find at least one biblionumber that has zero items checked out.
1 - Go into the module "Tools > Batch record deletion"
2 - in "List of biblionumbers or authority ids (one per line)" put the values you found in step 0.1 and 0.2
3 - click continue
4 - biblionumbers with at least one item checked out should not be clickable.
5 - biblionumbers with zero items checked out should be clickable.
6 - click "Select all" and "Clear all", both buttons should change the "checked" status of the enabled AND disabled biblionumber checkboxes.
7 - apply patch
8 - click "Select all" and "Clear all", both buttons should change the "checked" status of ONLY the enabled biblionumber checkboxes.
Comment 2 sandboxes@biblibre.com 2018-03-13 13:43:13 UTC
Patch tested with a sandbox, by JM Broust <jean-manuel.broust@univ-lyon2.fr>
Comment 3 sandboxes@biblibre.com 2018-03-13 13:43:35 UTC
Created attachment 72774 [details] [review]
Bug 20376: Select all ignores disabled checkboxes

Test Plan:

0.1 - find at least one biblionumber that has at least one item checked out
0.2 - find at least one biblionumber that has zero items checked out.
1 - Go into the module "Tools > Batch record deletion"
2 - in "List of biblionumbers or authority ids (one per line)" put the values you found in step 0.1 and 0.2
3 - click continue
4 - biblionumbers with at least one item checked out should not be clickable.
5 - biblionumbers with zero items checked out should be clickable.
6 - click "Select all" and "Clear all", both buttons should change the "checked" status of the enabled AND disabled biblionumber checkboxes.
7 - apply patch
8 - click "Select all" and "Clear all", both buttons should change the "checked" status of ONLY the enabled biblionumber checkboxes.

Signed-off-by: JM Broust <jean-manuel.broust@univ-lyon2.fr>
Comment 4 Katrin Fischer 2018-03-13 15:21:04 UTC
Created attachment 72797 [details] [review]
Bug 20376: Make select/unselect all ignore disabled checkboxes on batch record deletion

Test Plan:

0.1 - find at least one biblionumber that has at least one item checked out
0.2 - find at least one biblionumber that has zero items checked out.
1 - Go into the module "Tools > Batch record deletion"
2 - in "List of biblionumbers or authority ids (one per line)" put the values you found in step 0.1 and 0.2
3 - click continue
4 - biblionumbers with at least one item checked out should not be clickable.
5 - biblionumbers with zero items checked out should be clickable.
6 - click "Select all" and "Clear all", both buttons should change the "checked" status of the enabled AND disabled biblionumber checkboxes.
7 - apply patch
8 - click "Select all" and "Clear all", both buttons should change the "checked" status of ONLY the enabled biblionumber checkboxes.

Signed-off-by: JM Broust <jean-manuel.broust@univ-lyon2.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2018-03-19 18:29:59 UTC
Patch pushed to master for 18.05

Thanks Maksim for your first patch in!
Comment 6 Nick Clemens 2018-04-24 01:33:14 UTC
Awesome work all, backported to stable for 17.11.05
Comment 7 Fridolin SOMERS 2018-04-24 05:37:49 UTC
Pushed to 17.05.x for 17.05.11