Bug 38472

Summary: exportColumns hard-coded in patron categories, patron restriction types, and basket tables
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: BLOCKED --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, lucas
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38436
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 26553    
Bug Blocks:    
Attachments: Bug 38472: Remove kohaTable's exportColumns option
Bug 38472: Remove kohaTable's exportColumns option
Bug 38472: (follow-up) Adding and removing a few noExport classes
Bug 38472: Remove kohaTable's exportColumns option
Bug 38472: (follow-up) Adding and removing a few noExport classes
Bug 38472: Remove kohaTable's exportColumns option
Bug 38472: (follow-up) Adding and removing a few noExport classes

Description Jonathan Druart 2024-11-18 13:53:03 UTC
categories.js has
  exportColumns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],

It must use .noExport instead of the IDs. We are building the column list depending on syspref so the ID cannot be hard-coded.
Comment 1 Jonathan Druart 2025-01-28 11:17:13 UTC
Created attachment 177260 [details] [review]
Bug 38472: Remove kohaTable's exportColumns option

We hardcode the id of the columns to export, we should use .noExport
instead on the columns we do not want to export.

Test plan:
Confirm that the columns exported on the acqui/basket, admin/categories
and admin/restrictions pages are the same with and without this patch.
Comment 2 Owen Leonard 2025-01-28 14:54:02 UTC
Created attachment 177276 [details] [review]
Bug 38472: Remove kohaTable's exportColumns option

We hardcode the id of the columns to export, we should use .noExport
instead on the columns we do not want to export.

Test plan:
Confirm that the columns exported on the acqui/basket, admin/categories
and admin/restrictions pages are the same with and without this patch.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Owen Leonard 2025-01-28 14:54:03 UTC
Created attachment 177277 [details] [review]
Bug 38472: (follow-up) Adding and removing a few noExport classes

I think only the "Actions" column on the restrictions page should be
excluded from export. On the acquisitions basket page we need it on the
"Place hold" column.
Comment 4 David Nind 2025-01-29 11:12:10 UTC
Created attachment 177308 [details] [review]
Bug 38472: Remove kohaTable's exportColumns option

We hardcode the id of the columns to export, we should use .noExport
instead on the columns we do not want to export.

Test plan:
Confirm that the columns exported on the acqui/basket, admin/categories
and admin/restrictions pages are the same with and without this patch.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2025-01-29 11:12:13 UTC
Created attachment 177309 [details] [review]
Bug 38472: (follow-up) Adding and removing a few noExport classes

I think only the "Actions" column on the restrictions page should be
excluded from export. On the acquisitions basket page we need it on the
"Place hold" column.

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2025-01-29 11:26:30 UTC
Testing notes (using KTD):
1. Before applying the patches (and without the dependencies), use the 'Export' option for these tables:
   . Administration > Patrons and circulation > Patron categories   
   . Administration > Patrons and circulation > Patron restriction types
   . Acquisitions > [Vendor] > [A basket for a vendor with an order] (You need to add an order to a basket) 
2. Look at the columns exported in the files and compare to the columns shown in the browser for the tables - they don't match up.
3. Apply the patches (and dependencies).
4. Refresh the pages and export the tables again.
5. Note that:
   - The columns in the exported files match what is shown for the tables
   - The columns you would expect to be exported are exported, and columns such as Actions (Patron categories and Patron restriction types) or Place hold, Modify and Cancel order (for a basket) are not.
Comment 7 Lucas Gass (lukeg) 2025-01-29 22:12:34 UTC
Created attachment 177322 [details] [review]
Bug 38472: Remove kohaTable's exportColumns option

We hardcode the id of the columns to export, we should use .noExport
instead on the columns we do not want to export.

Test plan:
Confirm that the columns exported on the acqui/basket, admin/categories
and admin/restrictions pages are the same with and without this patch.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 8 Lucas Gass (lukeg) 2025-01-29 22:12:36 UTC
Created attachment 177323 [details] [review]
Bug 38472: (follow-up) Adding and removing a few noExport classes

I think only the "Actions" column on the restrictions page should be
excluded from export. On the acquisitions basket page we need it on the
"Place hold" column.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 9 Lucas Gass (lukeg) 2025-01-29 22:14:19 UTC
PQA here, but I will also set to BLOCKED until the dependencies can move. I signed off on both of them, so cannot QA.