[Bug 42343] New: JS error holdsQueueTable is undefined when no holds exist
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42343 Bug ID: 42343 Summary: JS error holdsQueueTable is undefined when no holds exist 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: bibliothek@th-wildau.de QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, lisette@bywatersolutions.com, tomascohen@gmail.com On title holds view, when 0 holds are existing the following error is thrown on firefox console: Uncaught (in promise) TypeError: can't access property "api", holdsQueueTable is undefined to recreate: - open a fresh ktd - open wed dev console - navigate to /cgi-bin/koha/reserve/request.pl?biblionumber=126 -- 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=42343 --- Comment #1 from Jan Kissig <bibliothek@th-wildau.de> --- it is caused by this line: holdsQueueTable.api().page(0).draw(false); as holdsQueueTable is undefined. Bonus: when holds are defined, the mentioned code causes a double api request. -- 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=42343 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=42288 -- 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=42343 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=42357 -- 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=42343 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23269 CC| |jonathan.druart@gmail.com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23269 [Bug 23269] Long hold queues are slowing the service -- 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=42343 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- - holdsQueueTable.api().page(0).draw(false); What's the point of this line? I think it should be removed. -- 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=42343 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- 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=42343 Johanna Räisä <johanna.raisa@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |johanna.raisa@koha-suomi.fi --- Comment #3 from Johanna Räisä <johanna.raisa@koha-suomi.fi> --- I cannot remember why I added that line, but I can check and add a 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=42343 Johanna Räisä <johanna.raisa@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |johanna.raisa@koha-suomi.fi |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=42343 Johanna Räisä <johanna.raisa@koha-suomi.fi> 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=42343 --- Comment #4 from Johanna Räisä <johanna.raisa@koha-suomi.fi> --- Created attachment 197481 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197481&action=edit Bug 42343: Prevent holds JS error when no holds exist In the holds view, opening a record with no existing holds can leave holdsQueueTable undefined while follow-up code still calls api() on it. This triggers a Firefox console error: Uncaught (in promise) TypeError: can't access property "api", holdsQueueTable is undefined Test plan: 1. Navigate to a title that has no existing holds. 2. Confirm no holdsQueueTable undefined error is logged. 3. Navigate to a title that has existing holds. 4. Confirm the holds queue still loads normally. 5. Confirm hold actions that refresh the queue still work as expected. Sponsored-by: Koha-Suomi Oy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42343 Johanna Räisä <johanna.raisa@koha-suomi.fi> 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=42343 Jonathan Druart <jonathan.druart@gmail.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=42343 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #197481|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=42343 --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 197484 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197484&action=edit Bug 42343: Prevent holds JS error when no holds exist In the holds view, opening a record with no existing holds can leave holdsQueueTable undefined while follow-up code still calls api() on it. This triggers a Firefox console error: Uncaught (in promise) TypeError: can't access property "api", holdsQueueTable is undefined Test plan: 1. Navigate to a title that has no existing holds. 2. Confirm no holdsQueueTable undefined error is logged. 3. Navigate to a title that has existing holds. 4. Confirm the holds queue still loads normally. 5. Confirm hold actions that refresh the queue still work as expected. Sponsored-by: Koha-Suomi Oy Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42343 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |bibliothek@th-wildau.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42343 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=42343 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #197484|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=42343 --- Comment #6 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 197492 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197492&action=edit Bug 42343: Prevent holds JS error when no holds exist In the holds view, opening a record with no existing holds can leave holdsQueueTable undefined while follow-up code still calls api() on it. This triggers a Firefox console error: Uncaught (in promise) TypeError: can't access property "api", holdsQueueTable is undefined Test plan: 1. Navigate to a title that has no existing holds. 2. Confirm no holdsQueueTable undefined error is logged. 3. Navigate to a title that has existing holds. 4. Confirm the holds queue still loads normally. 5. Confirm hold actions that refresh the queue still work as expected. Sponsored-by: Koha-Suomi Oy Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jan Kissig <bibliothek@th-wildau.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42343 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42343 --- Comment #7 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=42343 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=42343 --- Comment #8 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