[Bug 41792] New: Circulation rules entry count always +1
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41792 Bug ID: 41792 Summary: Circulation rules entry count always +1 Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: maxeinergl@gcc.edu QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com The circulation and fine rules grid begins with a "Showing 1 to X of X entries" counter, but the X count is always one too high. The counter seems to include the blank add/edit entry line at the bottom of the grid in the count. This should not be counted as if an actual entry in the rules. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41792 Michael Mundet <michael.mundet@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michael.mundet@gmail.com --- Comment #1 from Michael Mundet <michael.mundet@gmail.com> --- Confirmed on Koha 25.11.10, staff interface in French. Administration > Circulation and fine rules. The table has one saved rule (All / All). The empty row used to add a rule is also visible. The counter says "Showing 1 to 2 of 2 entries". The empty row is the extra entry. The counter includes the empty row (id edit_row) used to add or edit a rule. That row should be left visible, and excluded from the DataTables count, so the number matches the saved rules only. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41792 --- Comment #2 from Michael Mundet <michael.mundet@gmail.com> --- Created attachment 211635 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211635&action=edit Bug 41792: Exclude the empty circulation rule row from the count The circulation and fine rules table counts the empty edit row, so the DataTables info text is always one higher than the number of saved rules. Leave the row in place and exclude it from the info text. This is my first patch. Test plan: 1. Go to Administration > Circulation and fine rules. 2. With one saved rule, note that the info text counts the empty row too. 3. Apply the patch and restart Plack. 4. The info text counts only the saved rule, for example "Showing 1 to 1 of 1 entries". 5. The empty row remains visible at the bottom of the table. 6. Edit a saved rule and confirm its values are copied into the empty row. Assisted-by: Grok 4.7 (SpaceXAI) -- 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=41792 Michael Mundet <michael.mundet@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- 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=41792 Michael Mundet <michael.mundet@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |michael.mundet@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41792 Gretchen Maxeiner <maxeinergl@gcc.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #211635|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=41792 --- Comment #3 from Gretchen Maxeiner <maxeinergl@gcc.edu> --- Created attachment 211683 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211683&action=edit Bug 41792: Exclude the empty circulation rule row from the count The circulation and fine rules table counts the empty edit row, so the DataTables info text is always one higher than the number of saved rules. Leave the row in place and exclude it from the info text. This is my first patch. Test plan: 1. Go to Administration > Circulation and fine rules. 2. With one saved rule, note that the info text counts the empty row too. 3. Apply the patch and restart Plack. 4. The info text counts only the saved rule, for example "Showing 1 to 1 of 1 entries". 5. The empty row remains visible at the bottom of the table. 6. Edit a saved rule and confirm its values are copied into the empty row. Assisted-by: Grok 4.7 (SpaceXAI) Signed-off-by: Gretchen Maxeiner <maxeinergl@gcc.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41792 Gretchen Maxeiner <maxeinergl@gcc.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #4 from Gretchen Maxeiner <maxeinergl@gcc.edu> --- Signed off using a sandbox -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41792 --- Comment #5 from Gretchen Maxeiner <maxeinergl@gcc.edu> --- This looks good. Everything in the test plan works. The count is correct and updates correctly as additional entries are added. Adding and editing entries works as expected. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41792 Michael Mundet <michael.mundet@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #211683|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=41792 --- Comment #6 from Michael Mundet <michael.mundet@gmail.com> --- Created attachment 212140 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212140&action=edit Bug 41792: Exclude the empty circulation rule row from the count The circulation and fine rules table counts the empty edit row, so the DataTables info text is always one higher than the number of saved rules. Leave the row in place and exclude it from the info text. This is my first patch. Test plan: 1. Go to Administration > Circulation and fine rules. 2. With one saved rule, note that the info text counts the empty row too. 3. Apply the patch and restart Plack. 4. The info text counts only the saved rule, for example "Showing 1 to 1 of 1 entries". 5. The empty row remains visible at the bottom of the table. 6. Edit a saved rule and confirm its values are copied into the empty row. Assisted-by: Grok 4.7 (SpaceXAI) Signed-off-by: Gretchen Maxeiner <maxeinergl@gcc.edu> Signed-off-by: Michael Mundet <michael.mundet@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41792 --- Comment #7 from Michael Mundet <michael.mundet@gmail.com> --- Signed off using a sandbox -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41792 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org