Bug 30221 - Make the tables on opac-user.tt column configurable
Summary: Make the tables on opac-user.tt column configurable
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Arthur Suzuki
QA Contact: Testopia
URL: https://gitlab.com/arthur.suzuki/Koha...
Keywords:
Depends on:
Blocks: 38103
  Show dependency treegraph
 
Reported: 2022-03-03 16:14 UTC by Lucas Gass (lukeg)
Modified: 2025-01-08 09:16 UTC (History)
3 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 30221: make the tables on opac-user.tt configurable (16.34 KB, patch)
2024-09-30 08:22 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 30221: make the tables on opac-user.tt configurable (16.34 KB, patch)
2024-10-07 12:08 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 30221: add the checkout branch to the checkouts table on opac-user.pl (3.59 KB, patch)
2024-10-07 12:08 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 30221: made opac-readingrecord.pl table configurable (3.44 KB, patch)
2024-10-07 12:08 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 30221: clean unused code in opac-user.tt (1.63 KB, patch)
2024-10-07 12:08 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 30221: fix Javascript error (873 bytes, patch)
2024-10-07 12:08 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 30221: (QA follow-up) perl-tidyness (900 bytes, patch)
2024-10-07 12:08 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 30221: (QA follow-up) remove columns settings for OPAC users (1.39 KB, patch)
2024-10-10 09:25 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 30221: make the tables on opac-user.tt configurable (16.40 KB, patch)
2024-10-10 14:40 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 30221: add the checkout branch to the checkouts table on opac-user.pl (3.65 KB, patch)
2024-10-10 14:40 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 30221: made opac-readingrecord.pl table configurable (3.50 KB, patch)
2024-10-10 14:40 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 30221: clean unused code in opac-user.tt (1.69 KB, patch)
2024-10-10 14:40 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 30221: fix Javascript error (930 bytes, patch)
2024-10-10 14:40 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 30221: (QA follow-up) perl-tidyness (957 bytes, patch)
2024-10-10 14:40 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 30221: (QA follow-up) remove columns settings for OPAC users (1.45 KB, patch)
2024-10-10 14:40 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 30221: (QA follow-up) Fix column "renew" cannot be toggled (3.81 KB, patch)
2024-11-05 18:09 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 30221: (QA follow-up) add checkout branch information to other tables (3.73 KB, patch)
2024-11-05 18:09 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 30221: (QA follow-up) make holdshistory table configurable (4.04 KB, patch)
2024-11-05 18:09 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 30221: (QA follow-up) Fix column "renew" cannot be toggled (3.86 KB, patch)
2024-11-05 20:54 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 30221: (QA follow-up) add checkout branch information to other tables (3.79 KB, patch)
2024-11-05 20:54 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 30221: (QA follow-up) make holdshistory table configurable (4.10 KB, patch)
2024-11-05 20:54 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2022-03-03 16:14:30 UTC
There are several tables on opac-user.tt that would benefit from being column configurable. 

( check-outs, overdues, charges, holds, article requests )
Comment 1 Arthur Suzuki 2024-09-30 08:22:54 UTC
Created attachment 172214 [details] [review]
Bug 30221: make the tables on opac-user.tt configurable

Test plan:
- apply patch
- as an admin go to Administration / Table settings / Opac / Patron details
- hide a few columns (duedate, barcode)
- make a couple checkouts and/or holds for a patron
- login to the opac as this patron
- verify the tables on the patron account table is missing the selected columns

sponsored-by: Lyon 2 University
Comment 2 Arthur Suzuki 2024-09-30 08:38:47 UTC
We had a request from Lyon 2 Uni to make checkouts, overdues, holds and relative's issues configurable but I've just seen this bug so attached my patch to it instead of creating a new bug.

Didn't handled the charges and article requests pages though, shall we make a followup to do handle those?

Also I guess a couples of system preferences are made obsolete if the table is configurable, like "OPACFinesTab"... shall we make a followup patch to remove this?
It probably need a closer look to see if thoses are not used somewhere else.
Comment 3 Lucas Gass (lukeg) 2024-09-30 14:06:48 UTC
This is missing Recalls, Article requests, Clubs, Credits, and Charges tables. They should all be configurable.
Comment 4 Arthur Suzuki 2024-10-01 09:38:39 UTC
(In reply to Lucas Gass from comment #3)
> This is missing Recalls, Article requests, Clubs, Credits, and Charges
> tables. They should all be configurable.

Hi Lucas, maybe we can make this small improvement go through and file a linked bug for any other tables which needs to go to table settings?
Also those other tables are not in opac-user.tt but in opac-account.tt or even includes templates, touching them all in a single bug would increase the risk of conflicting... :(
Comment 5 Arthur Suzuki 2024-10-07 12:08:18 UTC
Created attachment 172451 [details] [review]
Bug 30221: make the tables on opac-user.tt configurable

Test plan:
- apply patch
- as an admin go to Administration / Table settings / Opac / Patron details
- hide a few columns (duedate, barcode)
- make a couple checkouts and/or holds for a patron
- login to the opac as this patron
- verify the tables on the patron account table is missing the selected columns

sponsored-by: Lyon 2 University
Comment 6 Arthur Suzuki 2024-10-07 12:08:21 UTC
Created attachment 172452 [details] [review]
Bug 30221: add the checkout branch to the checkouts table on opac-user.pl
Comment 7 Arthur Suzuki 2024-10-07 12:08:24 UTC
Created attachment 172453 [details] [review]
Bug 30221: made opac-readingrecord.pl table configurable
Comment 8 Arthur Suzuki 2024-10-07 12:08:27 UTC
Created attachment 172454 [details] [review]
Bug 30221: clean unused code in opac-user.tt
Comment 9 Arthur Suzuki 2024-10-07 12:08:29 UTC
Created attachment 172455 [details] [review]
Bug 30221: fix Javascript error
Comment 10 Arthur Suzuki 2024-10-07 12:08:32 UTC
Created attachment 172456 [details] [review]
Bug 30221: (QA follow-up) perl-tidyness
Comment 11 Lucas Gass (lukeg) 2024-10-07 20:11:15 UTC
(In reply to Arthur Suzuki from comment #4)
> (In reply to Lucas Gass from comment #3)
> > This is missing Recalls, Article requests, Clubs, Credits, and Charges
> > tables. They should all be configurable.
> 
> Hi Lucas, maybe we can make this small improvement go through and file a
> linked bug for any other tables which needs to go to table settings?
> Also those other tables are not in opac-user.tt but in opac-account.tt or
> even includes templates, touching them all in a single bug would increase
> the risk of conflicting... :(

That's fair. But one more question. I do see the Columns ( gear icon ) button on those OPAC tables. Do we want OPAC users to be able to adjust which columns are visible?
Comment 12 Arthur Suzuki 2024-10-08 07:58:12 UTC
(In reply to Lucas Gass from comment #11)
> That's fair. But one more question. I do see the Columns ( gear icon )
> button on those OPAC tables. Do we want OPAC users to be able to adjust
> which columns are visible?

It is  possible to disable which columns are visible and/or configurable by opac users by going to the Admin > Tables settings : https://koha-community.org/manual/latest/en/html/administration.html#table-settings
Comment 13 Lucas Gass (lukeg) 2024-10-08 15:21:12 UTC
(In reply to Arthur Suzuki from comment #12)
> (In reply to Lucas Gass from comment #11)
> > That's fair. But one more question. I do see the Columns ( gear icon )
> > button on those OPAC tables. Do we want OPAC users to be able to adjust
> > which columns are visible?
> 
> It is  possible to disable which columns are visible and/or configurable by
> opac users by going to the Admin > Tables settings :
> https://koha-community.org/manual/latest/en/html/administration.html#table-
> settings

I'm aware of Table settings. Have a look at other OPAC tables that are column configurable. The OPAC user cannot adjust what columns are visible when viewing the table. (Columns ( gear icon ))

Should we not be consistent with this behavior with all OPAC tables?
Comment 14 Owen Leonard 2024-10-08 15:59:54 UTC
I agree that we should not expose the column visibility feature in the OPAC. I think that introduces more complexity for the user than is necessary.
Comment 15 Katrin Fischer 2024-10-08 16:26:31 UTC
(In reply to Owen Leonard from comment #14)
> I agree that we should not expose the column visibility feature in the OPAC.
> I think that introduces more complexity for the user than is necessary.

+1
Comment 16 Arthur Suzuki 2024-10-10 09:25:03 UTC
Created attachment 172581 [details] [review]
Bug 30221: (QA follow-up) remove columns settings for OPAC users
Comment 17 Lucas Gass (lukeg) 2024-10-10 14:40:30 UTC
Created attachment 172610 [details] [review]
Bug 30221: make the tables on opac-user.tt configurable

Test plan:
- apply patch
- as an admin go to Administration / Table settings / Opac / Patron details
- hide a few columns (duedate, barcode)
- make a couple checkouts and/or holds for a patron
- login to the opac as this patron
- verify the tables on the patron account table is missing the selected columns

sponsored-by: Lyon 2 University
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 18 Lucas Gass (lukeg) 2024-10-10 14:40:33 UTC
Created attachment 172611 [details] [review]
Bug 30221: add the checkout branch to the checkouts table on opac-user.pl

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 19 Lucas Gass (lukeg) 2024-10-10 14:40:35 UTC
Created attachment 172613 [details] [review]
Bug 30221: made opac-readingrecord.pl table configurable

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 20 Lucas Gass (lukeg) 2024-10-10 14:40:38 UTC
Created attachment 172615 [details] [review]
Bug 30221: clean unused code in opac-user.tt

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 21 Lucas Gass (lukeg) 2024-10-10 14:40:41 UTC
Created attachment 172616 [details] [review]
Bug 30221: fix Javascript error

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 22 Lucas Gass (lukeg) 2024-10-10 14:40:44 UTC
Created attachment 172618 [details] [review]
Bug 30221: (QA follow-up) perl-tidyness

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 23 Lucas Gass (lukeg) 2024-10-10 14:40:47 UTC
Created attachment 172620 [details] [review]
Bug 30221: (QA follow-up) remove columns settings for OPAC users

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 24 Lucas Gass (lukeg) 2024-10-10 14:43:04 UTC
-Signed off, adding a couple notes:

1. I can hide every column. Should there be any that we consider cannot_be_toggled or cannot_be_modified? 

2. I can hide the renew column but still seeing buttons for Renew/Renew all. Turning off the OpacRenewalAllowed fixes this.
Comment 25 Arthur Suzuki 2024-10-14 13:09:32 UTC
(In reply to Lucas Gass (lukeg) from comment #24)
> -Signed off, adding a couple notes:
> 
> 1. I can hide every column. Should there be any that we consider
> cannot_be_toggled or cannot_be_modified?
> 
> 2. I can hide the renew column but still seeing buttons for Renew/Renew all.
> Turning off the OpacRenewalAllowed fixes this.

So maybe a "cannot_be_modified/cannot_be_toggled" flag on the "renew" column? What other columns did you have in mind which should not be configurable?
I can make a small follow-up patch to solve this.
Comment 26 Arthur Suzuki 2024-11-05 18:09:41 UTC
Created attachment 174014 [details] [review]
Bug 30221: (QA follow-up) Fix column "renew" cannot be toggled
Comment 27 Arthur Suzuki 2024-11-05 18:09:52 UTC
Created attachment 174015 [details] [review]
Bug 30221: (QA follow-up) add checkout branch information to other tables
Comment 28 Arthur Suzuki 2024-11-05 18:09:55 UTC
Created attachment 174016 [details] [review]
Bug 30221: (QA follow-up) make holdshistory table configurable
Comment 29 Lucas Gass (lukeg) 2024-11-05 20:54:36 UTC
Created attachment 174046 [details] [review]
Bug 30221: (QA follow-up) Fix column "renew" cannot be toggled

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 30 Lucas Gass (lukeg) 2024-11-05 20:54:38 UTC
Created attachment 174047 [details] [review]
Bug 30221: (QA follow-up) add checkout branch information to other tables

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 31 Lucas Gass (lukeg) 2024-11-05 20:54:41 UTC
Created attachment 174048 [details] [review]
Bug 30221: (QA follow-up) make holdshistory table configurable

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 32 Lucas Gass (lukeg) 2024-11-05 20:55:15 UTC
Arthur, the follow-ups look good. I am adding my SO line to the last 3 follow-ups. Thanks!
Comment 33 Arthur Suzuki 2024-11-06 08:07:06 UTC
Thank you Lucas! Very happy to get some more of my patches to Koha :)
Comment 34 Jonathan Druart 2025-01-08 09:16:02 UTC
KohaTable does not have bKohaColumnsUseNames at the OPAC, this cannot work correctly now.

You need bug 26553 and friends. I would recommend to base this patch set on top of it.