Bug 41079 - Checkboxes visible on the batch patron modification results view
Summary: Checkboxes visible on the batch patron modification results view
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major
Assignee: Jonathan Druart
QA Contact: Nick Clemens (kidclamp)
URL:
Keywords:
Depends on: 41065
Blocks:
  Show dependency treegraph
 
Reported: 2025-10-23 08:00 UTC by Jonathan Druart
Modified: 2025-10-24 13:59 UTC (History)
1 user (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 41079: Turn on bKohaColumnsUseNames for the batch patron modification results table (7.95 KB, patch)
2025-10-23 08:12 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 41079: Force visibility for columns depending on sysprefs (5.00 KB, patch)
2025-10-23 08:12 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 41079: Turn on bKohaColumnsUseNames for the batch patron modification results table (8.00 KB, patch)
2025-10-23 11:13 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 41079: Force visibility for columns depending on sysprefs (5.05 KB, patch)
2025-10-23 11:13 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2025-10-23 08:00:26 UTC
The table is not built correctly and the DT's saveState behaviour cannot work as expected.
Comment 1 Jonathan Druart 2025-10-23 08:12:49 UTC
Created attachment 188305 [details] [review]
Bug 41079: Turn on bKohaColumnsUseNames for the batch patron modification results table

A table cannot use the table settings if columns are displayed depending
on sysprefs.
Additionally DT's saveState does not work correctly if some columns are shown/hidden from one screen to
another.

We must add data-colname and turn bKohaColumnsUseNames on for this
table.

Also note that there were several discrepancies between the table
structure and the number of columns in the yaml file.
Comment 2 Jonathan Druart 2025-10-23 08:12:51 UTC
Created attachment 188306 [details] [review]
Bug 41079: Force visibility for columns depending on sysprefs

If two sysprefs are disabled we must hide the two related columns.
We should also force the visibility of the checkboxes: on the first
screen (op=show/edition) they must be displayed, on the result screen
(op=show_results) the must be hidden.

Test plan:
1. Create a report to see some patrons:
    SELECT cardnumber FROM borrowers WHERE cardnumber LIKE '%2'
2. Run report and select 'Batch operations ...'
3. Batch patron modification
=> Notice that the table has the checkboxes in the first column
=> The table is sorted by cardnumber
4. Perform the modification
=> Notice that the result table does not have the checkboxes in the first column
=> The table is still sorted by cardnumber

Additional tests:
1. If the logged in user is superlibrarian then the columns "Password expiration date"
and "Protected" are displayed
2. Play with the table's settings and columns visibility to confirm that
they are working correctly (they were not before this patch set)
Comment 3 Nick Clemens (kidclamp) 2025-10-23 11:13:52 UTC
Created attachment 188329 [details] [review]
Bug 41079: Turn on bKohaColumnsUseNames for the batch patron modification results table

A table cannot use the table settings if columns are displayed depending
on sysprefs.
Additionally DT's saveState does not work correctly if some columns are shown/hidden from one screen to
another.

We must add data-colname and turn bKohaColumnsUseNames on for this
table.

Also note that there were several discrepancies between the table
structure and the number of columns in the yaml file.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Nick Clemens (kidclamp) 2025-10-23 11:13:55 UTC
Created attachment 188330 [details] [review]
Bug 41079: Force visibility for columns depending on sysprefs

If two sysprefs are disabled we must hide the two related columns.
We should also force the visibility of the checkboxes: on the first
screen (op=show/edition) they must be displayed, on the result screen
(op=show_results) the must be hidden.

Test plan:
1. Create a report to see some patrons:
    SELECT cardnumber FROM borrowers WHERE cardnumber LIKE '%2'
2. Run report and select 'Batch operations ...'
3. Batch patron modification
=> Notice that the table has the checkboxes in the first column
=> The table is sorted by cardnumber
4. Perform the modification
=> Notice that the result table does not have the checkboxes in the first column
=> The table is still sorted by cardnumber

Additional tests:
1. If the logged in user is superlibrarian then the columns "Password expiration date"
and "Protected" are displayed
2. Play with the table's settings and columns visibility to confirm that
they are working correctly (they were not before this patch set)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Nick Clemens (kidclamp) 2025-10-23 11:16:53 UTC
Straightforward, moving to PQA
Comment 6 Lucas Gass (lukeg) 2025-10-24 13:59:23 UTC
Nice work everyone!

Pushed to main for 25.11