[Bug 33616] New: JavaScript error in when using claims return button in checkout table
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33616 Bug ID: 33616 Summary: JavaScript error in when using claims return button in checkout table Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com To recreate: 1. Set ClaimReturnedLostValue to a LOST value 2. Check out an item to a patron. 3. Click the Claim returned button within the checkout table. 4. Get spinning icon in place of the button 5. In the web developer tools console: Uncaught TypeError: value.match is not a function Looks like this is coming from includes/js-date-format.inc: 46 if ( ! value.match(/^\d{4}-\d{2}-\d{2}$/ ) ) { 47 m = m.tz(tz); 48 } -- 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=33616 --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- match() matches a string against a regular expression. We need to make sure the value passed is a string. -- 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=33616 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=33616 --- Comment #2 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 150248 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150248&action=edit Bug 33616: Make sure match() is evaluated against a string To Test: 1. Set ClaimReturnedLostValue to a LOST value 2. Check out an item to a patron. 3. Click the Claim returned button within the checkout table. 4. Get spinning icon in place of the button 5. In the web developer tools console: Uncaught TypeError: value.match is not a function 6. Apply patch 7. Try 2 - 3 again. This time the spinning icon should turn into a grey button with the correct date. 8. There should no longer be a console error. -- 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=33616 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | Patch complexity|--- |Trivial patch 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=33616 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=33616 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150248|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 150249 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150249&action=edit Bug 33616: Make sure match() is evaluated against a string To Test: 1. Set ClaimReturnedLostValue to a LOST value 2. Check out an item to a patron. 3. Click the Claim returned button within the checkout table. 4. Get spinning icon in place of the button 5. In the web developer tools console: Uncaught TypeError: value.match is not a function 6. Apply patch 7. Try 2 - 3 again. This time the spinning icon should turn into a grey button with the correct date. 8. There should no longer be a console error. 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=33616 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Lucas Gass from comment #1)
match() matches a string against a regular expression. We need to make sure the value passed is a string.
Looks good to me. Do you know what you got that triggered the type error? In theory we could pass something that may not have a toString method too and cause a new error? Probably not reproducable :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33616 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33616 --- Comment #5 from Lucas Gass <lucas@bywatersolutions.com> --- I think this is now a duplicate of Bug 33621. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33616 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |RESOLVED Resolution|--- |DUPLICATE --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- *** This bug has been marked as a duplicate of bug 33621 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org