[Bug 42724] New: Deleting a hold immediately after checking out to a patron fails
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42724 Bug ID: 42724 Summary: Deleting a hold immediately after checking out to a patron fails Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: ephetteplace@cca.edu QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, lisette@bywatersolutions.com, tomascohen@gmail.com Steps to recreate: 1. Create a hold for a patron (e.g. search for a bib > place hold > look up patron) 2. Go to Circulation > Check out 3. Look up the same patron 4. Check out a different item to them using its barcode 5. Switch to the Holds tab and click the delete icon for the hold from step #1 6. Confirm cancellation (reason doesn't matter) Expected: hold deletes. You remain on the patron's circ page. Actual: you are taken back to Circulation > Check out with no patron selected ("/circ/circulation.pl?borrowernumber=" note the lack of borrowernumber). The hold is not deleted; if you look up the patron again, it's still there. This happens specifically after checking out an item first and not otherwise. If you go to Circulation > Check Out and delete the hold first, it succeeds. First noticed as part of testing for Bug 42116 but I do not believe it's related. -- 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=42724 Eric Phetteplace <ephetteplace@cca.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- 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=42724 Eric Phetteplace <ephetteplace@cca.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=42116 -- 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=42724 --- Comment #1 from Eric Phetteplace <ephetteplace@cca.edu> --- I think I can explain why this is happening now. Circ > Check Out has a URL like /circ/circulation.pl?borrowernumber= but when you check out an item the URL updates to /circ/circulation.pl (no borrowernumber). You are still on the specific patron's check out page, though, with their check out and holds tables. The `holds_table_patron_page` function in staff-globals.js is specifically looking for URLs like "/circ/circulation.pl?borrowernumber=" however, so this no longer matches, and holds_table_patron_page() returns null. The holds.js code checks the return value of holds_table_patron_page() before adding a click handler to the #cancelModalConfirmBtn used in cancel-hold-modal: if (holds_table_patron_page()) { $("#cancelModalConfirmBtn").click(function (e) { e.preventDefault(); ... This code never executes because holds_table_patron_page() is null, the cancel button click handler isn't assigned, and cancel_holds() is never called. That's my theory at least, the holds.js file is complex. I'm not sure what the fix is, though: should checking out an item persist the borrowernumber in the URL? Should holds_table_patron_page have more logic for identifying when you're on a patron's circ page even though their borrowernumber is not in the URL? Is there a way to improve when the cancelModalConfirmBtn handler is added? I'm not sure what scenario is being worked around when we're not on a holds_table_patron_page and we don't want to assign this click handler. -- 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=42724 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE CC| |phil@chetcolibrary.org --- Comment #2 from Phil Ringnalda <phil@chetcolibrary.org> --- Bug 41825 thinks option 2 is the right thing: if you're on circulation.pl you're on a checkout page, no matter what the query string. *** This bug has been marked as a duplicate of bug 41825 *** -- 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=42724 Eric Phetteplace <ephetteplace@cca.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=42116 | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org