Bug 38954 - checkout type column should be hidden by colvis
Summary: checkout type column should be hidden by colvis
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 38783
Blocks: 40281 40299
  Show dependency treegraph
 
Reported: 2025-01-23 11:04 UTC by Jonathan Druart
Modified: 2025-07-03 08:28 UTC (History)
5 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.05.00,24.11.04
Circulation function:


Attachments
Bug 38954: Hide checkout type using colvis (2.45 KB, patch)
2025-01-23 11:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38954: Hide checkout type using colvis (2.50 KB, patch)
2025-01-23 19:54 UTC, David Nind
Details | Diff | Splinter Review
Screenshot - Type column value is system value, not a human-readable value (122.72 KB, image/png)
2025-01-23 20:03 UTC, David Nind
Details
Bug 38954: Hide checkout type using colvis (2.59 KB, patch)
2025-01-24 09:18 UTC, Marcel de Rooy
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-01-23 11:04:09 UTC
There is a "shift" in the checkout history table (readingrec)

https://snipboard.io/uTWYit.jpg
https://snipboard.io/qxZE35.jpg

The table should take the whole available width
Comment 1 Jonathan Druart 2025-01-23 11:07:17 UTC
Created attachment 176946 [details] [review]
Bug 38954: Hide checkout type using colvis

This is not the correct way to hide a column, we should use the DT's column
visibility plugin.

Test plan:
Have some checkouts for a patron, go to the checkout history page
Without this patch notice the "shift" => the table does not take the
whole available width.

Apply this patch, restart_all, remove localStorage entries

=> The table is now displayed properly

You can also play with on-site checkouts.

Before:
https://snipboard.io/uTWYit.jpg
https://snipboard.io/qxZE35.jpg

After:
https://snipboard.io/2L0F3Q.jpg
Comment 2 David Nind 2025-01-23 19:54:44 UTC
Created attachment 177073 [details] [review]
Bug 38954: Hide checkout type using colvis

This is not the correct way to hide a column, we should use the DT's column
visibility plugin.

Test plan:
Have some checkouts for a patron, go to the checkout history page
Without this patch notice the "shift" => the table does not take the
whole available width.

Apply this patch, restart_all, remove localStorage entries

=> The table is now displayed properly

You can also play with on-site checkouts.

Before:
https://snipboard.io/uTWYit.jpg
https://snipboard.io/qxZE35.jpg

After:
https://snipboard.io/2L0F3Q.jpg
Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2025-01-23 20:03:19 UTC
Created attachment 177075 [details]
Screenshot - Type column value is system value, not a human-readable value

I've signed off, but I had to apply bug 38783 first, otherwise I got a sha1/fake ancestor error. I've added it as a dependency.

Also, there is now a new "Type" column displayed by default. For normal checkouts, the value shown is "standard_checkout" (see the screenshot). 

Shouldn't this display as a "human-readable" value, rather than a system value? Such as "Standard checkout", and for other types of checkouts (which I didn't test).

I do really like the improved layout and the pill "button", it is very much improved!
Comment 4 Jonathan Druart 2025-01-23 20:32:47 UTC
You should not see the "Type" column. Did you restart_all after you applied the patches? Also maybe you need to remove your localStorage entries.
Comment 5 David Nind 2025-01-23 21:07:47 UTC
(In reply to Jonathan Druart from comment #4)
> You should not see the "Type" column. Did you restart_all after you applied
> the patches? Also maybe you need to remove your localStorage entries.

Apologies for the noise - that was it! Now working as expected.

(I normally start with a fresh browser with a cleared cache after applying a patch. For some reason, I forgot to do this...)
Comment 6 Marcel de Rooy 2025-01-24 09:18:51 UTC
Created attachment 177100 [details] [review]
Bug 38954: Hide checkout type using colvis

This is not the correct way to hide a column, we should use the DT's column
visibility plugin.

Test plan:
Have some checkouts for a patron, go to the checkout history page
Without this patch notice the "shift" => the table does not take the
whole available width.

Apply this patch, restart_all, remove localStorage entries

=> The table is now displayed properly

You can also play with on-site checkouts.

Before:
https://snipboard.io/uTWYit.jpg
https://snipboard.io/qxZE35.jpg

After:
https://snipboard.io/2L0F3Q.jpg
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Katrin Fischer 2025-01-24 11:04:00 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 8 Paul Derscheid 2025-04-22 20:28:25 UTC
Nice work everyone!

Pushed to 24.11.x for 24.11.04
Comment 9 Laura Escamilla 2025-06-30 16:58:00 UTC
It looks like the yaml updates are not in main. The column is now visible, due to the .tt changes but it's not being hidden in the .yml file. 



1449     checkouthistory:
1450       checkouthistory-table:
1451         default_display_length: 20
1452         columns:
1453             - columnname: type
1454               cannot_be_toggled: 1
1455               cannot_be_modified: 1
1456             -
Comment 10 David Nind 2025-06-30 18:39:36 UTC
(In reply to Laura Escamilla from comment #9)
> It looks like the yaml updates are not in main. The column is now visible,
> due to the .tt changes but it's not being hidden in the .yml file. 
> 
> 
> 
> 1449     checkouthistory:
> 1450       checkouthistory-table:
> 1451         default_display_length: 20
> 1452         columns:
> 1453             - columnname: type
> 1454               cannot_be_toggled: 1
> 1455               cannot_be_modified: 1
> 1456             -

Can confirm.

It looks like the change was inadvertantly reversed by Bug 37273: Added ID column to ERM Agreements and Licenses Tables.

The weird thing is that I can't see it in the diffs on the bug, but the change was made in the actual commit https://git.koha-community.org/Koha-community/Koha/commit/d361c8adb6ffc5b269a4ec869ae31435205fc823?files=admin/columns_settings.yml

I've created Bug 40281 - Patron circulation history page - type column is not hidden, and added a patch, ready for sign off.