To recreate: 1. In 24.05.x, hide some columns via Table settings. 2. The columns do not hide properly, you cannot hide any columns via Table settings on this table.
It seems to be the update_columns_visibility function, it is hiding columns without data but ignoring those configured via column settings.
Created attachment 177204 [details] [review] Bug 38978: [24.05.x] Fix update_columns_visibility to check table settings To test: 1. In 24.05.x, hide some columns via Table settings. 2. The columns do not hide properly, you cannot hide any columns via Table settings on this table. 3. APPLY PATCH 4. Check hiding columns now, it should work. 5. Make sure that columns with no data at all are still hidden. 6. Enable 'SeparateHoldings' and make sure you can also properly hide columns in the Other holdings table.
I had a go at testing, but the patch doesn't seem to work for me. I can replicate the issue. However, after applying the patch the columns are not hiding correctly for me. Using KTD: 1. Koha codebase: git checkout 24.05.x 2. KTD: - Change .env file: KOHA_IMAGE=24.05 - Update images: ktd pull - Start up KTD: ktd up 3. Apply the patch, restart everything (restart_all), and clear browser cache. 4. View record 262 (Programming Perl). 5. Default columns shown (holdings_issues, holdings_renewals, and holdings_localuse are selected in the "Is hidden by default" for table settings): - Tick box - Item type - Current library - Home library - Collection - Status - Last seen - Checkouts (is showing even though holdings_issues is hidden by default) - Renewals (is showing even though holdings_renewals is hidden by default) - Barcode - Actions column 6. Hide "Last seen" and "Barcode" (Table id: holdings_table). 7. Columns now shown: - Tick box - Item type - Current library - Home library - Collection - Status --> Last seen: still shown - Checkouts --> Renewals: no longer shown --> Barcode: still shown - Actions column
Thanks David. I see, we don't have bKohaColumnsUseNames in main anymore but have it in 24.05.x, so this is accounting for missing columns. Reverting Bug 38118 solves the Table settings not working, but it brings back the bug describe there. Going to need a solution here that uses bKohaColumnsUseNames.
Created attachment 177205 [details] [review] Bug 38978: [24.05.x] Don't show every column initially To test: 1. In 24.05.x, hide some columns via Table settings. 2. The columns do not hide properly, you cannot hide any columns via Table settings on this table. 3. APPLY PATCH 4. Check hiding columns now, it should work. 5. Make sure that columns with no data at all are still hidden. 6. Enable 'SeparateHoldings' and make sure you can also properly hide columns in the Other holdings table.
Note to testers: Ensure the test plans from Bug 38240 and Bug 38118 still work.
changes work as intended for http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=312&searchid=scs_1738080254469 internal admin page but I am seeing blank columns after applying the patch at http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=312
disregard that previous comment. it was a mistake in my system.
Created attachment 177287 [details] [review] Bug 38978: [24.05.x] Don't show every column initially To test: 1. In 24.05.x, hide some columns via Table settings. 2. The columns do not hide properly, you cannot hide any columns via Table settings on this table. 3. APPLY PATCH 4. Check hiding columns now, it should work. 5. Make sure that columns with no data at all are still hidden. 6. Enable 'SeparateHoldings' and make sure you can also properly hide columns in the Other holdings table. Signed-off-by: Imani Thomas <imani.thomas@bywatersolutions.com>
Fixing those bugs in version < 24.11 is almost impossible. You can go with this, but you will have other weird behaviours that are certainly fixed in main. For instance here, if you have a column A with (item1=aaa, item2=aaaa, item3=aaaaa), then a column B (with item1,2,3 empty and item 4=bbb) Then global filter using aaa will remove the column B because all empty. If you clear the global filter the column B will stay empty. This certainly also appears when you change page. Example: https://snipboard.io/PaXHmW.jpg https://snipboard.io/lUVKHa.jpg https://snipboard.io/MvDjUu.jpg I am not blocking here, but I let you chose which bug is the worst :D
(In reply to Jonathan Druart from comment #10) > Fixing those bugs in version < 24.11 is almost impossible. Why impossible?
(In reply to Lucas Gass (lukeg) from comment #11) > (In reply to Jonathan Druart from comment #10) > > Fixing those bugs in version < 24.11 is almost impossible. > > Why impossible? This area moved a lot, we there were several follow-ups to fix different bugs on this specific page. As you can see in my previous comment your patch introduced another bug, which is fixed in the next version.