[Bug 42986] New: JS error when writing off selected charges
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42986 Bug ID: 42986 Summary: JS error when writing off selected charges Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Staff interface Assignee: koha-bugs@lists.koha-community.org Reporter: caroline.cyr-la-rose@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Target Milestone: --- When you go to write off selected charges, there is an error in the console. To recreate : 1. In the staff interface, go to a patron's account 2. Go to Accounting > Create manual invoice 3. Fill out the manual invoice form with an amount 4. Click Save 5. Go to Make a payment 6. Click Write off selected 7. IMPORTANT : Open the browser console 8. Click Confirm --> In the console, there is an error 'Uncaught TypeError: can't access property "innerHTML", change is undefined' -- 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=42986 --- Comment #1 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- In case anyone else comes here for this, I found this while running my Cypress tests. To circumvent this in my test, I added the same code as in bug 38817 (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38817#c2) Cypress.on('uncaught:exception', (err, runnable) => { return false; // Prevent Cypress from failing the test until bz42986 is fixed }); Note that my test passed in 25.05 without getting caught on this error. So this is new. -- 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=42986 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com Depends on| |42466 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Broken by commit 4a71a8476e7e7d91f5c233cbd7e32642de652538 Bug 42466: Fix ignored form validation on paycollect ? Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42466 [Bug 42466] UseCashRegisters gets ignored on paycollect when change > 0 -- 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=42986 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- 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=42986 --- Comment #3 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 201559 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201559&action=edit Bug 42986: Fix Uncaught TypeError on paycollect This patch introduces a check if the variable change is defined, before its property innerHTML is accessed. When calling "Write off selected" an Uncaught TypeError is thrown on form submission when accessing change.innerHTML as the variable change is undefined. This regression was introduced by bug 42466 in a new submit handler which did not check if 'change' was defined at all. Test plan: 1. In the staff interface, go to a patron's account 2. Go to Accounting > Create manual invoice 3. Fill out the manual invoice form with an amount 4. Click Save 5. Go to Make a payment 6. Click "Write off selected" (not write off on a single row) 7. IMPORTANT : Open the browser console 8. Click Confirm 9. apply patch and redo steps 1 - 8. -- 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=42986 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=42986 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201559|0 |1 is obsolete| | -- 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=42986 --- Comment #4 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Created attachment 201563 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201563&action=edit Bug 42986: Fix Uncaught TypeError on paycollect This patch introduces a check if the variable change is defined, before its property innerHTML is accessed. When calling "Write off selected" an Uncaught TypeError is thrown on form submission when accessing change.innerHTML as the variable change is undefined. This regression was introduced by bug 42466 in a new submit handler which did not check if 'change' was defined at all. Test plan: 1. In the staff interface, go to a patron's account 2. Go to Accounting > Create manual invoice 3. Fill out the manual invoice form with an amount 4. Click Save 5. Go to Make a payment 6. Click "Write off selected" (not write off on a single row) 7. IMPORTANT : Open the browser console 8. Click Confirm 9. apply patch and redo steps 1 - 8. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> -- 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=42986 --- Comment #5 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Thanks Jan! -- 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=42986 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |jonathan.druart@gmail.com |y.org | Status|Signed Off |Passed QA -- 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=42986 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201563|0 |1 is obsolete| | -- 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=42986 --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 201565 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201565&action=edit Bug 42986: Fix Uncaught TypeError on paycollect This patch introduces a check if the variable change is defined, before its property innerHTML is accessed. When calling "Write off selected" an Uncaught TypeError is thrown on form submission when accessing change.innerHTML as the variable change is undefined. This regression was introduced by bug 42466 in a new submit handler which did not check if 'change' was defined at all. Test plan: 1. In the staff interface, go to a patron's account 2. Go to Accounting > Create manual invoice 3. Fill out the manual invoice form with an amount 4. Click Save 5. Go to Make a payment 6. Click "Write off selected" (not write off on a single row) 7. IMPORTANT : Open the browser console 8. Click Confirm 9. apply patch and redo steps 1 - 8. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org