[Bug 15792] New: Double-clicking the 'renew' button on circulation.pl will double-charge account management fee
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15792 Bug ID: 15792 Summary: Double-clicking the 'renew' button on circulation.pl will double-charge account management fee Change sponsored?: --- Product: Koha Version: 3.18 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: barton@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com PREREQUISITES 1) Create an account type that has an enrollment fee, and create a borrower of that type. 2) Write off any account management fees charged to that borrower by the account creation. STEPS TO RE-CREATE 1) Change borrower's dateexpiry to make the borrower expired. 2) Paste borrower's card number into 'Check out' bar 3) A warning will appear saying that the borrower's account has expired, including a 'Renew' link. 4) Double-click the link 5) Check the borrower's fines. You will see two account management fees in a row. distinct from the fee that was written off just after the patron was created. -- 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=15792 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal Version|3.18 |master -- 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=15792 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #1 from Marc Véron <veron@veron.ch> --- Confirmed. -- 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=15792 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Rather than try to address this in the template I wonder if it would make sense to add a check to the renewal process to abort the process if the patron's expiration date is already set to the date calculated by the renew_account? -- 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=15792 Benjamin Daeuber <bdaeuber@cityoffargo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bdaeuber@cityoffargo.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15792 Cheryl <clackman@fargolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clackman@fargolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15792 --- Comment #3 from Benjamin Daeuber <bdaeuber@cityoffargo.com> --- (In reply to Owen Leonard from comment #2)
Rather than try to address this in the template I wonder if it would make sense to add a check to the renewal process to abort the process if the patron's expiration date is already set to the date calculated by the renew_account?
I agree with this. There's really no reason I can think of the renew to the same day. -- 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=15792 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cslone@camdencountylibrary. | |org --- Comment #4 from Paul Derscheid <paul.derscheid@lmscloud.de> --- *** Bug 20170 has been marked as a duplicate of this bug. *** -- 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=15792 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=15792 --- Comment #5 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 194372 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194372&action=edit Bug 15792: Throttle patron renewal links to prevent double-clicks - Replace plain <a> renewal links in patron_messages.inc with the reusable throttled-button component introduced in Bug 40896 - Covers all four renewal links: warndeparture and expired states, in both circulation and patron detail contexts - Include throttledButton.js in circulation.tt and moremember.tt - Add persist mode and done icon state to throttled-button component so the button stays disabled on bfcache restore with a check icon instead of a misleading spinner Test plan: 1) Create or update a patron category with an enrollment fee and an enrollment period in months (e.g. 24 months) 2) Create a patron of that type and write off any initial enrollment fee 3) Set the patron's dateexpiry to the past so the account is expired 4) Go to /cgi-bin/koha/circ/circulation.pl and scan the patron 5) Observe the "Renew" link in the expiration warning now shows as a small button with a rotate icon 6) Click "Renew" and confirm the button becomes disabled with a spinner, preventing a second click 7) Verify the patron is renewed correctly with only one enrollment fee charged and the correct expiry date 8) Press the browser back button to return via bfcache 9) Verify the button remains disabled and shows a check icon instead of the spinner, indicating the action was already completed 10) Repeat from the patron detail page (moremember.pl) to verify the same throttle and done-state behavior there 11) Test the warndeparture case by setting dateexpiry to a near-future date and confirming the same behavior -- 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=15792 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |paul.derscheid@lmscloud.de |ity.org | CC| |paul.derscheid@lmscloud.de QA Contact|testopia@bugs.koha-communit |andrew@bywatersolutions.com |y.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=15792 David Nind <david@davidnind.com> 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=15792 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194372|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 194418 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194418&action=edit Bug 15792: Throttle patron renewal links to prevent double-clicks - Replace plain <a> renewal links in patron_messages.inc with the reusable throttled-button component introduced in Bug 40896 - Covers all four renewal links: warndeparture and expired states, in both circulation and patron detail contexts - Include throttledButton.js in circulation.tt and moremember.tt - Add persist mode and done icon state to throttled-button component so the button stays disabled on bfcache restore with a check icon instead of a misleading spinner Test plan: 1) Create or update a patron category with an enrollment fee and an enrollment period in months (e.g. 24 months) 2) Create a patron of that type and write off any initial enrollment fee 3) Set the patron's dateexpiry to the past so the account is expired 4) Go to /cgi-bin/koha/circ/circulation.pl and scan the patron 5) Observe the "Renew" link in the expiration warning now shows as a small button with a rotate icon 6) Click "Renew" and confirm the button becomes disabled with a spinner, preventing a second click 7) Verify the patron is renewed correctly with only one enrollment fee charged and the correct expiry date 8) Press the browser back button to return via bfcache 9) Verify the button remains disabled and shows a check icon instead of the spinner, indicating the action was already completed 10) Repeat from the patron detail page (moremember.pl) to verify the same throttle and done-state behavior there 11) Test the warndeparture case by setting dateexpiry to a near-future date and confirming the same behavior Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15792 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This fixes patron renewal release notes| |from the patron check out | |or details page, so that | |you can't double-click the | |"Renew" link, and get | |double-charged the | |enrollment fee (where an | |enrollment fee is this is | |set for the patron | |category). | | | |It also changes the "Renew" | |link from a text link to a | |standard light-grey action | |button. --- Comment #7 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. Step 3 - changing expiry date using SQL: - Access the database: koha-mysql kohadev - Check details for the patron, where XX is teh borrower number: select * from borrowers where borrowernumber=XX\G; - If using KTD and you have created a new patron, the borrowernumber=54 - SQL to update the expiry date: update borrowers set dateexpiry="2026-03-01" where borrowernumber=54; - On the patron's details page it should say "Expiration: Patron's card has expired. Renew or Edit details" 2. Step 11: Edit the patron record and the for the 'Expiry date' field, change the date to yesterday using the date picker. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15792 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15792 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194418|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=15792 --- Comment #8 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 196339 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196339&action=edit Bug 15792: Throttle patron renewal links to prevent double-clicks - Replace plain <a> renewal links in patron_messages.inc with the reusable throttled-button component introduced in Bug 40896 - Covers all four renewal links: warndeparture and expired states, in both circulation and patron detail contexts - Include throttledButton.js in circulation.tt and moremember.tt - Add persist mode and done icon state to throttled-button component so the button stays disabled on bfcache restore with a check icon instead of a misleading spinner Test plan: 1) Create or update a patron category with an enrollment fee and an enrollment period in months (e.g. 24 months) 2) Create a patron of that type and write off any initial enrollment fee 3) Set the patron's dateexpiry to the past so the account is expired 4) Go to /cgi-bin/koha/circ/circulation.pl and scan the patron 5) Observe the "Renew" link in the expiration warning now shows as a small button with a rotate icon 6) Click "Renew" and confirm the button becomes disabled with a spinner, preventing a second click 7) Verify the patron is renewed correctly with only one enrollment fee charged and the correct expiry date 8) Press the browser back button to return via bfcache 9) Verify the button remains disabled and shows a check icon instead of the spinner, indicating the action was already completed 10) Repeat from the patron detail page (moremember.pl) to verify the same throttle and done-state behavior there 11) Test the warndeparture case by setting dateexpiry to a near-future date and confirming the same behavior Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Andrew Fuerste Henry <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=15792 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15792 --- Comment #9 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15792 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.05 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15792 --- Comment #10 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org