Bug 28014 - Add table settings to batch patron modification
Summary: Add table settings to batch patron modification
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 28007
Blocks:
  Show dependency treegraph
 
Reported: 2021-03-22 14:15 UTC by Owen Leonard
Modified: 2021-04-19 13:09 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
This patch adds DataTable table configuration and export options to the table of patrons submitted for batch modification, both before and after modifications are made. The table will now be configurable via Table Settings in Administration.
Version(s) released in:
21.05.00


Attachments
Bug 28014: Add table settings to batch patron modification (7.75 KB, patch)
2021-03-22 15:01 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28014: Add table settings to batch patron modification (7.79 KB, patch)
2021-03-23 15:25 UTC, Amit Gupta
Details | Diff | Splinter Review
Bug 28014: Add table settings to batch patron modification (7.85 KB, patch)
2021-03-27 16:20 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28014: Add table settings to batch patron modification (7.58 KB, patch)
2021-04-09 16:20 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2021-03-22 14:15:49 UTC
It would be useful to be able to configure table settings for the preview and results of batch patron modification
Comment 1 Owen Leonard 2021-03-22 15:01:42 UTC Comment hidden (obsolete)
Comment 2 Amit Gupta 2021-03-23 15:25:04 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2021-03-27 16:20:28 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2021-04-06 12:49:37 UTC
Please rebase on top of bug 28007.
Comment 5 Owen Leonard 2021-04-09 16:20:37 UTC
Created attachment 119419 [details] [review]
Bug 28014: Add table settings to batch patron modification

This patch adds table settings to the tables shown before and after
a batch of patrons has been submitted for batch patron modification.

To test you must have ExtendedPatronAttributes enabled and at least one
configured.

- Go to Tools -> Batch patron modification
- Submit a set of patrons for modification
- In the table showing patron records which will be modified, confirm
  that all DataTables controls work correctly.
  - Confirm that the column visibility settings work correctly,
    including the controls for extended patron attribute columns.
- Submit a change to your patron batch.
- On the page showing the results, confirm that the DataTables controls
  continue to work as expected.
- Go to Administraion -> Table settings and confirm that making changes
  to the default configuration for this table (Tools ->
  batch_patron_modification -> borrowerst) results in the correct
  default columns being shown on the batch patron modification pages.

Signed-off-by: Amit Gupta <amitddng135@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2021-04-12 13:21:42 UTC
Not directly related to this (I think), but I found something:
The NoSort is not taken into account (the first column, the checkboxes, is sortable). It could have been caused by bug 28055, but not sure I understand the problem correctly. Reverting the following changes seem to fix the problem:

-    if ( new_parameters["aoColumnDefs"] === undefined ) {
-        new_parameters["aoColumnDefs"] = default_column_defs;
+    if ( new_parameters["columnDefs"] === undefined ) {
+        new_parameters["columnDefs"] = default_column_defs;

Owen, could you have a look please (certainly need to be fixed as a follow-up of bug 28055 if the assertion is correct)?
Comment 7 Owen Leonard 2021-04-12 15:24:21 UTC
You're correct Jonathan, the changes to columns_settings.inc adversely affect several pages which still use the old "aoColumnDefs" option. Those particular lines should be only be converted to use "columnDefs" if the patch includes changes to those other files at the same time.

Would you prefer the follow-up here or on Bug 28055? Or a new bug?
Comment 8 Jonathan Druart 2021-04-12 16:51:11 UTC
A follow-up on bug 28055 would be perfect!
Comment 9 Jonathan Druart 2021-04-14 13:36:26 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 10 Fridolin Somers 2021-04-19 13:09:50 UTC
Depends on Bug 28007 not in 20.11.x