Bug 41604 - Impossible to hide Checkin column in issues-table in circ/circulation.pl
Summary: Impossible to hide Checkin column in issues-table in circ/circulation.pl
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Hammat wele
QA Contact: Testopia
URL:
Keywords: regression
Depends on: 41314
Blocks:
  Show dependency treegraph
 
Reported: 2026-01-13 15:45 UTC by Caroline Cyr La Rose
Modified: 2026-02-02 13:09 UTC (History)
6 users (show)

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


Attachments
Bug 41604: Impossible to hide Checkin column in issues-table in circ/circulation.pl (2.03 KB, patch)
2026-01-15 03:38 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 41604: Impossible to hide Checkin column in issues-table in circ/circulation.pl (2.08 KB, patch)
2026-01-15 13:10 UTC, David Nind
Details | Diff | Splinter Review
Bug 41604: Centralize visibility condition in datatables.js (3.76 KB, patch)
2026-02-02 13:07 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2026-01-13 15:45:36 UTC
Bug 41314 caused a regression, making it impossible to hide the Checkin column in the issues table in the patron's circulation page. We had complaints about this following our first wave of upgrades from 24.05(.05) to 25.05(.06).

To recreate:
1. Hide the checkin column by default in circulation issues-table
   1.1. Go to Administration > Table settings > Circulation tab > Jump to page : circulation > Table id: issues-table
   1.2. Check "Is hidden by default" for "checkin"
   1.3. Click "Save"

2. Checkout an item to a patron
   2.1. In the search bar, set to Checkout, search for Henry
   2.2. In the checkout field, enter the barcode 39999000010114 and press enter
   --> In the table of issues, Checkin column is visible, it should be hidden by default

I personally find the checkin column particularly dangerous as staff don't need to scan the item to return it, leading to potentially checking in items that weren't actually returned by the patron.
Comment 1 Hammat wele 2026-01-15 03:38:50 UTC
Created attachment 191480 [details] [review]
Bug 41604: Impossible to hide Checkin column in issues-table in circ/circulation.pl

Bug 41314 caused a regression, making it impossible to hide the Checkin column in the issues table in the patron's circulation page.

To recreate:
1. Hide the checkin column by default in circulation issues-table
   1.1. Go to Administration > Table settings > Circulation tab > Jump to page : circulation > Table id: issues-table
   1.2. Check 'Is hidden by default' for 'checkin'
   1.3. Click 'Save'
2. logout and login
3. Checkout an item to a patron
   3.1. In the search bar, set to Checkout, search for Henry
   3.2. In the checkout field, enter the barcode 39999000010114 and press enter
   --> In the table of issues, Checkin column is visible, it should be hidden by default
4. Apply the patch
5. Repeat step 2, 3
   --> In the table of issues, Checkin column is not visible
Comment 2 David Nind 2026-01-15 13:10:46 UTC
Created attachment 191482 [details] [review]
Bug 41604: Impossible to hide Checkin column in issues-table in circ/circulation.pl

Bug 41314 caused a regression, making it impossible to hide the Checkin column in the issues table in the patron's circulation page.

To recreate:
1. Hide the checkin column by default in circulation issues-table
   1.1. Go to Administration > Table settings > Circulation tab > Jump to page : circulation > Table id: issues-table
   1.2. Check 'Is hidden by default' for 'checkin'
   1.3. Click 'Save'
2. logout and login
3. Checkout an item to a patron
   3.1. In the search bar, set to Checkout, search for Henry
   3.2. In the checkout field, enter the barcode 39999000010114 and press enter
   --> In the table of issues, Checkin column is visible, it should be hidden by default
4. Apply the patch
5. Repeat step 2, 3
   --> In the table of issues, Checkin column is not visible

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Jonathan Druart 2026-01-23 11:41:18 UTC
I have decided to force the visibility of columns depending on syspref's setting.

Otherwise the column visibility state is broken when the syspref's value is modified.

However here it depends on permission, but the problem is the same.

Try to:
add superlibrarian permission to edna
login with edna
check an item out, and on "Details" tab (moremember, not circulation!) you can see the "check in" column.
Now restrict the permission to only catalogue+borrowers
Refresh moremember
=> With this patch the checkin column is displayed

So this can be considered a bug, and that's why I forced the visibility.

In discussion to get an answer from Caroline, we need to discuss if we are ready for those bugs.

Also if we go with this solution I don't see a good reason to not apply the same change to the "Renew" column.
Comment 4 Caroline Cyr La Rose 2026-01-23 14:05:03 UTC
(In reply to Jonathan Druart from comment #3)
> I have decided to force the visibility of columns depending on syspref's
> setting.

Which syspref controls the checkin column?
Comment 5 Jonathan Druart 2026-01-26 08:21:07 UTC
(In reply to Caroline Cyr La Rose from comment #4)
> (In reply to Jonathan Druart from comment #3)
> > I have decided to force the visibility of columns depending on syspref's
> > setting.
> 
> Which syspref controls the checkin column?

"However here it depends on permission, but the problem is the same."

I meant that in case of the "Checkin" column the visibility does not depend on a syspref, but on a permission (circulate:circulate_remaining_permissions).
Comment 6 Caroline Cyr La Rose 2026-01-26 14:27:51 UTC
Would these be all the cases?

Permission			Column visibility setting	Column toggle		Result	Toggle
Superlibrarian			visible by default		can be toggled		visible	enabled
Superlibrarian			visible by default		cannot be toggled	visible	disabled
Superlibrarian			hidden by default		can be toggled		hidden	enabled
Superlibrarian			hidden by default		cannot be toggled	hidden	disabled
circulate_remaining_permissions	visible by default		can be toggled		visible	enabled
circulate_remaining_permissions	visible by default		cannot be toggled	visible	disabled
circulate_remaining_permissions	hidden by default		can be toggled		hidden	enabled
circulate_remaining_permissions	hidden by default		cannot be toggled	hidden	disabled
none of the above		visible by default		can be toggled		hidden	disabled
none of the above		visible by default		cannot be toggled	hidden	disabled
none of the above		hidden by default		can be toggled		hidden	disabled
none of the above		hidden by default		cannot be toggled	hidden	disabled
Comment 7 Caroline Cyr La Rose 2026-01-26 14:34:00 UTC
I think if the column is hidden in the table settings, that should trump the permissions.
Comment 8 Katrin Fischer 2026-01-30 10:59:44 UTC
I agree with Caroline: We need a way to keep the column hidden and table configuration should take precedence.

And the longer comment:

The checkin column is known to have problems with transports and other messages 
that are lost when you return from this screen. A lot of libraries have chosen not to allow this action from this page because of this. 
On the other hand it's needed for some use cases, like ItemfallbackSearch (no barcodes in the items) for example to have a good way to return the items.

My stance would be that if you set the table configuration to:
- Do not display by default
- Don't allow to toggle

That the column should not display and one should not be able to make it visible.

I believe the permission here is just "circulate", but the higher priority should be the table configuration in this case and the more logical one. You can still circulate, but not return (a small part of it) from this page.
Comment 9 Jonathan Druart 2026-02-02 13:07:36 UTC
Created attachment 192316 [details] [review]
Bug 41604: Centralize visibility condition in datatables.js

We want to hide column if:
 * the feature is not accessible (pref disabled or insufficient
   permissions)
or
 * the column is hidden in the settings
or
 * the column has been hidden by the user
Comment 10 Jonathan Druart 2026-02-02 13:09:20 UTC
I think this patch introduces consistent behaviour in the different situations. Can you please test it?

It's not ready for inclusion, other occurrences of 'force_visibility' (in other views) will need adjustements, but the checkouts table can be tested.

It affects the 4 columns: checkin, renew, claims and export.