[Bug 41439] New: Column filtering on the circ rules table
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Bug ID: 41439 Summary: Column filtering on the circ rules table Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com The Circulation Rules table is obscenely wide at this point. We've tried a number of approaches to a new UI in this area, and so far all have got stuck. I'm proposing a smaller impact resolution of just having a set of column groups for display to allow limiting the width of the table to only those fields of interest at the moment you're working. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 190455 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190455&action=edit Bug 41439: Add column visibility toggles to circulation rules table The circulation rules table has become excessively wide with 40+ columns, making it difficult to navigate and use. This patch adds column visibility toggle buttons that allow users to focus on specific rule categories. Changes: - Add toggle buttons for: Checkouts, Due dates, Fines, Renewals, Holds, Article requests, Recalls, and Show all - Group columns into logical categories based on their function - Default to showing only Checkout columns on page load for a cleaner initial view - Highlight the active button to indicate current view - Disable search functionality (not appropriate for this table) - Calculate column indices dynamically based on enabled system preferences (UnseenRenewals, ArticleRequests, UseRecalls) Test plan: 1. Navigate to Administration > Circulation and fine rules 2. Observe the table now shows only checkout-related columns by default with the "Checkouts" button highlighted 3. Click different category buttons (Fines, Renewals, Holds, etc.) and verify only relevant columns are shown 4. Verify the active button is highlighted in blue 5. Click "Show all" to display all columns 6. Verify the layout works with different system preference combinations (enable/disable ArticleRequests, UseRecalls, UnseenRenewals) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 190456 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190456&action=edit Proof of concept -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- This is just a proof of concept for now and will need testing to ensure it fully works with form submission etc.. I've only quickly trials the 'look'. Setting to Needs Signoff to trigger some feedback.. whilst I do want some feedback and any suggestions of other approaches, lets try to stick to simple solutions for now to limit the scope.. I still think longer term we'll want to re-write this page in Vue with a possibly very different overall UI but that's for another bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190455|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 190459 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190459&action=edit Bug 41439: Add column visibility toggles to circulation rules table The circulation rules table has become excessively wide with 40+ columns, making it difficult to navigate and use. This patch adds column visibility toggle buttons that allow users to focus on specific rule categories. Changes: - Add data-colname attributes to all table headers and footers for robust column identification - Add toggle buttons for: Checkouts, Due dates, Fines, Renewals, Holds, Article requests, Recalls, and Show all - Group columns into logical categories based on their function - Use column name selectors instead of fragile index-based selection for maintainability - Default to showing only Checkout columns on page load for a cleaner initial view - Highlight the active button to indicate current view - Disable search functionality (not appropriate for this table) - Handle dynamic column visibility based on system preferences (UnseenRenewals, ArticleRequests, UseRecalls) Test plan: 1. Navigate to Administration > Circulation and fine rules 2. Observe the table now shows only checkout-related columns by default with the "Checkouts" button highlighted 3. Click different category buttons (Fines, Renewals, Holds, etc.) and verify only relevant columns are shown 4. Verify the active button is highlighted in blue 5. Click "Show all" to display all columns 6. Verify the layout works with different system preference combinations (enable/disable ArticleRequests, UseRecalls, UnseenRenewals) 7. Verify column visibility persists correctly when system preferences are changed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clemens.tubach@kit.edu, | |michaela.sieber@kit.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=33312 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com, | |george@nekls.org --- Comment #5 from David Nind <david@davidnind.com> --- Just to say, I like it! I've added George Williams to the bug - I recall seeing something similar done with JQuery on TTEOTV or koha-US special interest group videos over the last few years. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 OpenFifth Sandboxes <sandboxes@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190459|0 |1 is obsolete| | --- Comment #6 from OpenFifth Sandboxes <sandboxes@openfifth.co.uk> --- Created attachment 190546 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190546&action=edit Bug 41439: Add column visibility toggles to circulation rules table The circulation rules table has become excessively wide with 40+ columns, making it difficult to navigate and use. This patch adds column visibility toggle buttons that allow users to focus on specific rule categories. Changes: - Add data-colname attributes to all table headers and footers for robust column identification - Add toggle buttons for: Checkouts, Due dates, Fines, Renewals, Holds, Article requests, Recalls, and Show all - Group columns into logical categories based on their function - Use column name selectors instead of fragile index-based selection for maintainability - Default to showing only Checkout columns on page load for a cleaner initial view - Highlight the active button to indicate current view - Disable search functionality (not appropriate for this table) - Handle dynamic column visibility based on system preferences (UnseenRenewals, ArticleRequests, UseRecalls) Test plan: 1. Navigate to Administration > Circulation and fine rules 2. Observe the table now shows only checkout-related columns by default with the "Checkouts" button highlighted 3. Click different category buttons (Fines, Renewals, Holds, etc.) and verify only relevant columns are shown 4. Verify the active button is highlighted in blue 5. Click "Show all" to display all columns 6. Verify the layout works with different system preference combinations (enable/disable ArticleRequests, UseRecalls, UnseenRenewals) 7. Verify column visibility persists correctly when system preferences are changed Signed-off-by: georgewilliams <george@nekls.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 George Williams (NEKLS) <george@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #7 from George Williams (NEKLS) <george@nekls.org> --- Outstanding! Thanks for this improvement. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- In my test I couldn't submit edits in two different tabs. If I add a value under "checkouts" and then one under "holds" and submit, only the active tab's changes are saved. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #9 from George Williams (NEKLS) <george@nekls.org> --- Yes, I see what Owen is saying also. In my first test, I only tested adding rules, not modifying an existing rule. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 carthur@slolibrary.org <carthur@slolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |carthur@slolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #10 from carthur@slolibrary.org <carthur@slolibrary.org> --- +1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #11 from David Nind <david@davidnind.com> --- I quickly demoed this at the koha-US Customization Special Interest Group today. Everyone was very positive about it, including a +100! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 190646 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190646&action=edit Bug 41439: Fix form submission for hidden column inputs When using the column visibility toggles, only inputs in the currently visible columns were being submitted with the form. This meant that if a user edited a value in "Checkouts" view, then switched to "Holds" view to edit another value, only the holds values would be saved. This patch adds a form submit handler that temporarily shows all columns before form submission, ensuring all input values are included regardless of which view is currently active. Test plan: 1. Navigate to Administration > Circulation and fine rules 2. Click "Checkouts" button 3. Enter a value in "Current checkouts allowed" field 4. Click "Holds" button 5. Enter a value in "Holds allowed (total)" field 6. Click Save 7. Verify both values are saved (previously only the holds value would be saved) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #13 from David Nind <david@davidnind.com> --- Wasn't sure if this as ready for re-testing, but I had a go. It is still not correctly saving things - for non-visible groups it is resetting to the empty value: 1. Enable UseRecalls and ArticleRequests. 2. For the checkouts section, edit the "All All" rule, change current checkouts allowed from unlimited to 50, click save. 3. Click the holds button, and edit the "All All" rule, change holds allowed (total) from unlimited to 50, click save. 4. Repeat steps 2 and 3, except this time don't save each time, save once both changes are made. 5. Up until now, everything works as expected and things are all updated correctly. 6. Edit the holds rule by itself, change 50 to 25, and click save. 7. In the checkouts section, current checkouts allowed is changed from 50 to unlimited. Presumably because the changed value for the filed is empty, so it resets to unlimted. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Katie Bliss <kebliss@dmpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kebliss@dmpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Danielle M. <dmeininger591@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmeininger591@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 mteal@greenvillelibrary.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mteal@greenvillelibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Ashley Hernandez <ahernandez@ckls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ahernandez@ckls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=15522 Keywords| |Hackfest CC| |laurence.rault@biblibre.com --- Comment #14 from Michaela Sieber <michaela.sieber@kit.edu> --- There was already Feedback in this Mattermost discussion: https://chat.koha-community.org/koha-community/pl/6m9r6p4ifjfjdcg94d8tn8nepw Topic for Hackfest 2026 in Marseille -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Donna <bwsdonna@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bwsdonna@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Kendall Purser <bcldteam.kendall@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bcldteam.kendall@gmail.com URL| |https://github.com/orwek/Ko | |ha-Bits/blob/main/IntranetU | |serJS.js#L92 --- Comment #15 from Kendall Purser <bcldteam.kendall@gmail.com> --- I made the following for our library using JavaScript/Jquery: https://github.com/orwek/Koha-Bits/blob/main/IntranetUserJS.js#L92 It holds on to information between tabs because I am only hiding the columns in the view, not rewriting the table each time. The commend underneath this snippet gives the column numbers so it is easy to customize or add more buttons. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190546|0 |1 is obsolete| | Attachment #190646|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #16 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195953 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195953&action=edit Bug 41439: Add column visibility toggles to circulation rules table The circulation rules table has become excessively wide with 40+ columns, making it difficult to navigate and use. This patch adds column visibility toggle buttons that allow users to focus on specific rule categories. Changes: - Add data-colname attributes to all table headers and footers for robust column identification - Add toggle buttons for: Checkouts, Due dates, Fines, Renewals, Holds, Article requests, Recalls, and Show all - Group columns into logical categories based on their function - Use column name selectors instead of fragile index-based selection for maintainability - Default to showing only Checkout columns on page load for a cleaner initial view - Highlight the active button to indicate current view - Disable search functionality (not appropriate for this table) - Handle dynamic column visibility based on system preferences (UnseenRenewals, ArticleRequests, UseRecalls) Test plan: 1. Navigate to Administration > Circulation and fine rules 2. Observe the table now shows only checkout-related columns by default with the "Checkouts" button highlighted 3. Click different category buttons (Fines, Renewals, Holds, etc.) and verify only relevant columns are shown 4. Verify the active button is highlighted in blue 5. Click "Show all" to display all columns 6. Verify the layout works with different system preference combinations (enable/disable ArticleRequests, UseRecalls, UnseenRenewals) 7. Verify column visibility persists correctly when system preferences are changed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #17 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195954 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195954&action=edit Bug 41439: Fix form submission for hidden column inputs When using the column visibility toggles, only inputs in the currently visible columns were being submitted with the form. This meant that if a user edited a value in "Checkouts" view, then switched to "Holds" view to edit another value, only the holds values would be saved. This patch adds a form submit handler that temporarily shows all columns before form submission, ensuring all input values are included regardless of which view is currently active. Test plan: 1. Navigate to Administration > Circulation and fine rules 2. Click "Checkouts" button 3. Enter a value in "Current checkouts allowed" field 4. Click "Holds" button 5. Enter a value in "Holds allowed (total)" field 6. Click Save 7. Verify both values are saved (previously only the holds value would be saved) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #18 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195955 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195955&action=edit Bug 41439: Fix hidden column inputs resetting values on save When editing a rule while a column group is hidden, DataTables removes hidden <td> elements from the DOM. On form submit, restoring visibility with columns().visible(true) re-inserts those cells with empty inputs, causing the corresponding fields to be saved as empty (e.g. unlimited). Before making all columns visible, repopulate hidden column inputs from the highlighted display row using DataTables' cached cell nodes. Mirrors the same special-case logic used when clicking Edit (unlimited fields, hardduedate, no_auto_renewal_after_hard_limit, cap_fine_to_replacement_price). Also add CSP nonce to the <style> element to fix QA forbidden_patterns. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #19 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195956 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195956&action=edit Owens tabs for consistency? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Emmanuel Bétemps <e.betemps@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195953|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Emmanuel Bétemps <e.betemps@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195954|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Emmanuel Bétemps <e.betemps@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195955|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #20 from Emmanuel Bétemps <e.betemps@gmail.com> --- Created attachment 196017 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196017&action=edit Bug 41439: Add column visibility toggles to circulation rules table The circulation rules table has become excessively wide with 40+ columns, making it difficult to navigate and use. This patch adds column visibility toggle buttons that allow users to focus on specific rule categories. Changes: - Add data-colname attributes to all table headers and footers for robust column identification - Add toggle buttons for: Checkouts, Due dates, Fines, Renewals, Holds, Article requests, Recalls, and Show all - Group columns into logical categories based on their function - Use column name selectors instead of fragile index-based selection for maintainability - Default to showing only Checkout columns on page load for a cleaner initial view - Highlight the active button to indicate current view - Disable search functionality (not appropriate for this table) - Handle dynamic column visibility based on system preferences (UnseenRenewals, ArticleRequests, UseRecalls) Test plan: 1. Navigate to Administration > Circulation and fine rules 2. Observe the table now shows only checkout-related columns by default with the "Checkouts" button highlighted 3. Click different category buttons (Fines, Renewals, Holds, etc.) and verify only relevant columns are shown 4. Verify the active button is highlighted in blue 5. Click "Show all" to display all columns 6. Verify the layout works with different system preference combinations (enable/disable ArticleRequests, UseRecalls, UnseenRenewals) 7. Verify column visibility persists correctly when system preferences are changed Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #21 from Emmanuel Bétemps <e.betemps@gmail.com> --- Created attachment 196018 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196018&action=edit Bug 41439: Fix form submission for hidden column inputs When using the column visibility toggles, only inputs in the currently visible columns were being submitted with the form. This meant that if a user edited a value in "Checkouts" view, then switched to "Holds" view to edit another value, only the holds values would be saved. This patch adds a form submit handler that temporarily shows all columns before form submission, ensuring all input values are included regardless of which view is currently active. Test plan: 1. Navigate to Administration > Circulation and fine rules 2. Click "Checkouts" button 3. Enter a value in "Current checkouts allowed" field 4. Click "Holds" button 5. Enter a value in "Holds allowed (total)" field 6. Click Save 7. Verify both values are saved (previously only the holds value would be saved) Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #22 from Emmanuel Bétemps <e.betemps@gmail.com> --- Created attachment 196019 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196019&action=edit Bug 41439: Fix hidden column inputs resetting values on save When editing a rule while a column group is hidden, DataTables removes hidden <td> elements from the DOM. On form submit, restoring visibility with columns().visible(true) re-inserts those cells with empty inputs, causing the corresponding fields to be saved as empty (e.g. unlimited). Before making all columns visible, repopulate hidden column inputs from the highlighted display row using DataTables' cached cell nodes. Mirrors the same special-case logic used when clicking Edit (unlimited fields, hardduedate, no_auto_renewal_after_hard_limit, cap_fine_to_replacement_price). Also add CSP nonce to the <style> element to fix QA forbidden_patterns. Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Emmanuel Bétemps <e.betemps@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |e.betemps@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Gamo <moise.gachiniard@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |moise.gachiniard@biblibre.c | |om --- Comment #23 from Gamo <moise.gachiniard@biblibre.com> --- Just tested it, with current latest version. Seems really great and would be way much easier for customers ! Still, I suggest the use of Owens tabs. It would be more user friendly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #24 from Gamo <moise.gachiniard@biblibre.com> --- https://sandboxes.biblibre.eu/signoff/test ko but for the 3 current patch : Signed-off-by: Moïse Gachiniard <moise.gachiniard@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=39127 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #25 from David Cook <dcook@prosentient.com.au> --- I like the sound of this. Going to make a note to revisit this. Especially since it would allow us to move on from having the same conversation across multiple bug reports like bug 39127 and bug 15522 and I'm sure heaps of others. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #26 from David Cook <dcook@prosentient.com.au> --- I think the bug title could probably be phrased better, but I can't be fussed at this point. Hoping to look at this sometime this week... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #27 from David Cook <dcook@prosentient.com.au> --- I'm liking this overall, although I'm not 100% sure about the way the buttons display about the table. It looks a bit weird having two separate control DIVs with a gap between them. It also looks a bit weird having them all be right aligned I think. -- I reckon that a lot of this Javascript could actually be placed in a separate .js file. I think the mix of template toolkit and JS will be at odds with Jonathan's latest script tidy work. I think we should get into the habit of putting the styles into separate files as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #28 from Jonathan Druart <jonathan.druart@gmail.com> --- 1. th in thead should not be added to the DOM conditionally, it breaks the column visibility feature, see bug 41604. I can rebase on top of it if you want. 2. This morning I also worked on another DT bug (bug 42910), and the following line would be problematic: dtApi.columns().visible(true); "programmatic-change" would need to be set. 3. TT tags within script tags are no longer allowed 4. I would move CSS rules to a .css file I can implement 1 and 2 but we will have to wait. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Michelle Spinney <mspinney@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mspinney@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #29 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 204330 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204330&action=edit Bug 41439: (follow-up) Update for script tag tidying Also moving <style> block to the top of the page. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Biblibre Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196017|0 |1 is obsolete| | Attachment #196018|0 |1 is obsolete| | Attachment #196019|0 |1 is obsolete| | Attachment #204330|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #30 from Biblibre Sandboxes <sandboxes@biblibre.com> --- Created attachment 204361 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204361&action=edit Bug 41439: Add column visibility toggles to circulation rules table The circulation rules table has become excessively wide with 40+ columns, making it difficult to navigate and use. This patch adds column visibility toggle buttons that allow users to focus on specific rule categories. Changes: - Add data-colname attributes to all table headers and footers for robust column identification - Add toggle buttons for: Checkouts, Due dates, Fines, Renewals, Holds, Article requests, Recalls, and Show all - Group columns into logical categories based on their function - Use column name selectors instead of fragile index-based selection for maintainability - Default to showing only Checkout columns on page load for a cleaner initial view - Highlight the active button to indicate current view - Disable search functionality (not appropriate for this table) - Handle dynamic column visibility based on system preferences (UnseenRenewals, ArticleRequests, UseRecalls) Test plan: 1. Navigate to Administration > Circulation and fine rules 2. Observe the table now shows only checkout-related columns by default with the "Checkouts" button highlighted 3. Click different category buttons (Fines, Renewals, Holds, etc.) and verify only relevant columns are shown 4. Verify the active button is highlighted in blue 5. Click "Show all" to display all columns 6. Verify the layout works with different system preference combinations (enable/disable ArticleRequests, UseRecalls, UnseenRenewals) 7. Verify column visibility persists correctly when system preferences are changed Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #31 from Biblibre Sandboxes <sandboxes@biblibre.com> --- Created attachment 204362 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204362&action=edit Bug 41439: Fix form submission for hidden column inputs When using the column visibility toggles, only inputs in the currently visible columns were being submitted with the form. This meant that if a user edited a value in "Checkouts" view, then switched to "Holds" view to edit another value, only the holds values would be saved. This patch adds a form submit handler that temporarily shows all columns before form submission, ensuring all input values are included regardless of which view is currently active. Test plan: 1. Navigate to Administration > Circulation and fine rules 2. Click "Checkouts" button 3. Enter a value in "Current checkouts allowed" field 4. Click "Holds" button 5. Enter a value in "Holds allowed (total)" field 6. Click Save 7. Verify both values are saved (previously only the holds value would be saved) Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #32 from Biblibre Sandboxes <sandboxes@biblibre.com> --- Created attachment 204363 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204363&action=edit Bug 41439: Fix hidden column inputs resetting values on save When editing a rule while a column group is hidden, DataTables removes hidden <td> elements from the DOM. On form submit, restoring visibility with columns().visible(true) re-inserts those cells with empty inputs, causing the corresponding fields to be saved as empty (e.g. unlimited). Before making all columns visible, repopulate hidden column inputs from the highlighted display row using DataTables' cached cell nodes. Mirrors the same special-case logic used when clicking Edit (unlimited fields, hardduedate, no_auto_renewal_after_hard_limit, cap_fine_to_replacement_price). Also add CSP nonce to the <style> element to fix QA forbidden_patterns. Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #33 from Biblibre Sandboxes <sandboxes@biblibre.com> --- Created attachment 204364 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204364&action=edit Bug 41439: (follow-up) Update for script tag tidying Also moving <style> block to the top of the page. Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aude.charillon@openfifth.co | |.uk, | |caroline.cyr-la-rose@inlibr | |o.com, | |katrin.fischer@bsz-bw.de, | |marie-luce.laflamme@inlibro | |.com, | |philip.orr@lmscloud.de Status|Needs Signoff |Signed Off --- Comment #34 from Michaela Sieber <michaela.sieber@kit.edu> --- I’m giving the sign-off, as the functionality is working as intended. It’s a great feature and makes editing the rules much easier. That said, there are two aspects I’d still like to get some additional opinions on, especially from people who work in daily support or provide training: 1.) I think the tabs should be more prominent. At the moment, they are quite small and could easily be overlooked. 2.) The default tab is currently set to “Checkouts”. My concern is that the tabs, and therefore the other available views, could be overlooked. So I’d like to put up for discussion whether the default should remain “Show All” to keep the initial change smaller. I also wanted to ask whether the idea with the tabs, as shown in the attachment “Owens tabs for consistency?” , is not feasible, or why it was discarded. You can also see there that the “All” tab is positioned first and is therefore the default. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #35 from Aude Charillon <aude.charillon@openfifth.co.uk> --- (In reply to Michaela Sieber from comment #34)
That said, there are two aspects I’d still like to get some additional opinions on, especially from people who work in daily support or provide training:
1.) I think the tabs should be more prominent. At the moment, they are quite small and could easily be overlooked. 2.) The default tab is currently set to “Checkouts”. My concern is that the tabs, and therefore the other available views, could be overlooked. So I’d like to put up for discussion whether the default should remain “Show All” to keep the initial change smaller.
I also wanted to ask whether the idea with the tabs, as shown in the attachment “Owens tabs for consistency?” , is not feasible, or why it was discarded. You can also see there that the “All” tab is positioned first and is therefore the default.
1. Agreed; it's not a blocker but those tabs do look a bit small. As Michaela said, it would be interesting to know why this display was chosen over “Owens tabs for consistency?”. 2. I actually like that "Show all" is at the end, and not the default... For me the whole point is to make the table easier to manage, so it's helpful to land on an already reduced screen. In training, we already explain that the table has a lot of options and that it's worth checking all columns - in the future we can say the same but phrase it as "going through all the tabs". I don't see it being a problem for library staff already using Koha - they know the table is big, and they will quickly spot the tabs they need. I am looking forward to seeing this new display in a Koha version soon! :-) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #36 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Adding my vote for Owen's tabs. I prefer consistency in the interface. I also want to make sure that this is done so that it's translatable. Here's what I did : 1. Setup 1.1. git pull in koha git 1.2. git pull in koha-testing-docker 1.3. ktd pull 1.4. ktd up 2. Install language 2.1. ktd --shell 2.2. koha-translate --install fr-CA --dev kohadev --> Was already installed in my case 2.3. gulp po:update --lang fr-CA (to update the po files with the patches from the bz) 2.4. exit shell (Ctrl + D) 2.5. ktd --root --shell 2.6. koha-translate --update fr-CA --dev kohadev 2.7. exit shell (Ctrl + D) 2.8. In koha go to Administration 2.9. Search for languages in system preferences 2.10. Check Français (fr-CA) in StaffInterfaceLanguages 2.11. Click Save all I18N/L10N preferences 2.12. Go to main page and change the language of the interface to Français 3. Check the translation in the interface 3.1. Go to Administration > Règles de circulation --> Not translated 4. Check the po files 4.1. In the koha git, go to misc/translator/po 4.2. git grep "Renewals" fr-CA* --> there are instances in fr-CA-opac-bootstrap.po, fr-CA-pref.po and fr-CA-staff-prog.po -- most likely staff-prog in this case 4.3. vi fr-CA-staff-prog.po --> "Renewals" is already translated. No "Renewals" string in smart-rules.tt Am I missing something? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #37 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- (In reply to Caroline Cyr La Rose from comment #36)
Adding my vote for Owen's tabs. I prefer consistency in the interface.
I also want to make sure that this is done so that it's translatable.
Here's what I did : 1. Setup 1.1. git pull in koha git 1.2. git pull in koha-testing-docker 1.3. ktd pull 1.4. ktd up
2. Install language 2.1. ktd --shell 2.2. koha-translate --install fr-CA --dev kohadev --> Was already installed in my case 2.3. gulp po:update --lang fr-CA (to update the po files with the patches from the bz) 2.4. exit shell (Ctrl + D) 2.5. ktd --root --shell 2.6. koha-translate --update fr-CA --dev kohadev 2.7. exit shell (Ctrl + D) 2.8. In koha go to Administration 2.9. Search for languages in system preferences 2.10. Check Français (fr-CA) in StaffInterfaceLanguages 2.11. Click Save all I18N/L10N preferences 2.12. Go to main page and change the language of the interface to Français
3. Check the translation in the interface 3.1. Go to Administration > Règles de circulation --> Not translated
4. Check the po files 4.1. In the koha git, go to misc/translator/po 4.2. git grep "Renewals" fr-CA* --> there are instances in fr-CA-opac-bootstrap.po, fr-CA-pref.po and fr-CA-staff-prog.po -- most likely staff-prog in this case 4.3. vi fr-CA-staff-prog.po --> "Renewals" is already translated. No "Renewals" string in smart-rules.tt
Am I missing something?
Opps, sorry I forgot the step where I apply the bz... 1. Setup 1.1. ktd down 1.2. git pull in koha git 1.3. git pull in koha-testing-docker 1.4. ktd pull 1.5. ktd up 2. Apply patches 2.1. in koha git, git bz apply 41439 (y) 2.2. ktd --shell 2.3. reset_all (y) 3. Install language 3.1. ktd --shell 3.2. koha-translate --install fr-CA --dev kohadev --> Was already installed in my case 3.3. gulp po:update --lang fr-CA (to update the po files with the patches from the bz) 3.4. exit shell (Ctrl + D) 3.5. ktd --root --shell 3.6. koha-translate --update fr-CA --dev kohadev 3.7. exit shell (Ctrl + D) 3.8. In koha go to Administration 3.9. Search for languages in system preferences 3.10. Check Français (fr-CA) in StaffInterfaceLanguages 3.11. Click Save all I18N/L10N preferences 3.12. Go to main page and change the language of the interface to Français 4. Check the translation in the interface 4.1. Go to Administration > Règles de circulation --> Not translated 5. Check the po files 5.1. In the koha git, go to misc/translator/po 5.2. git grep "Renewals" fr-CA* --> there are instances in fr-CA-opac-bootstrap.po, fr-CA-pref.po and fr-CA-staff-prog.po -- most likely staff-prog in this case 5.3. vi fr-CA-staff-prog.po --> "Renewals" is already translated. No "Renewals" string in smart-rules.tt Am I missing something? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #38 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 1) I think the visual concept was "filters" instead of "tabs". We do have some of those like when filtering out paid transactions. I think filters could be interesting if I can select more than one at a time to show, but if only one can be selected tabs seem the more consistent choice. 2) I was team "show all as default", but reading Aude's comment I am no longer so sure. It might be nice to go from all to more specific to make things a little easier to set up in the beginning. Both approaches have merit - having the all tab as default would be less disruptive on update. 3) I think you are right Caroline, looking at the code there is a translatability issue: text: is not translatable: + // Add our custom column visibility buttons + const visibilityButtons = [ + { + text: 'Checkouts', + className: 'btn btn-sm btn-default', + action: function (e, dt, node, config) { + dt.columns().visible(false); + dt.columns(getColumnSelector(columnGroups.core.concat(columnGroups.checkout))).visible(true); + } + }, + { + text: 'Due dates', -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #39 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 204411 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204411&action=edit Bug 41439: (follow-up) Make strings translatable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #40 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 204412 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204412&action=edit Bug 41439: (follow-up) Use success class instead of primary for filter buttons -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #41 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Thanks Owen, I tested the translatability and it works now! I think the green buttons are better than the yellow. I'd still prefer the actual tabs. But if we need to compromise I guess that's ok. I just don't like introducing new displays that might confuse new users or users that are not super comfortable with computers (I know we all are and for us it's not a problem whether it's a tab or a button, but I have a lot of clients who are volunteers in smaller libraries and they do amazing work, but computers are not always their strongest suit. Changing interfaces is a challenge for some). I didn't test much else other than enabling the ArticleRequests syspref and checking the "tab" appears. So I don't feel comfortable signing off everything. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #42 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Caroline Cyr La Rose from comment #41)
I'd still prefer the actual tabs. But if we need to compromise I guess that's ok.
I may be just getting hung up on my mental model of the interaction and missing the user's likely interpretation. I would love to hear more opinions. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41439 --- Comment #43 from David Nind <david@davidnind.com> --- Created attachment 205105 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205105&action=edit Screenshot - with patches applied (2026-09-06) I don't mind the filters, but think I would prefer the "tab look". I've attached a screenshot with how it looks with the current patches. Some more food for thought - Christopher and George talked about this a lot in their recent presentation at the koha-US conderence: Terrific Every-Other-Thursday Training - Live: Circulation and fine rules https://www.youtube.com/watch?v=oAcIik1xZI4 (45 mins) What I think is interesting is some of the history, related bugs, some ideas of how to make it work better, and the Q&A questions. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org