[Bug 42613] New: Javascript error on subscription-detail.pl if no orders (part deux)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42613 Bug ID: 42613 Summary: Javascript error on subscription-detail.pl if no orders (part deux) Initiative type: --- Sponsorship --- status: Product: Koha Version: 25.11 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org JavaScript error on subscription detail page when there are no orders. Same issue as bug 42611. Note though that it's NOT a problem in "main"/26.05 as table_dt is now defined using this invocation: let table_dt = table?.DataTable(); -- 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=42613 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | -- 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=42613 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 199172 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199172&action=edit Bug 42613: Fix javascript error This change adds the "optional chaining ?." operator so that it returns undefined instead of throwing an error. Test plan: 0. Do NOT apply the patch 1. Create a Subscription in the Serials module 2. Open your F12 tools 3. Note on subscription-detail.pl that there is a Javascript error 4. Apply the patch 5. Refresh the page and note that there is no longer a Javascript error 6. To test that the datatable actually works, create a basket for a vendor and create an order for that basket using "From subscription" and choose your subscription 7. Reload subscription-detail.pl and click on "Acquisition details" 8. Note that the DataTable appears (and there's still no Javascript errors) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42613 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=42613 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199172|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=42613 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 199176 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199176&action=edit Bug 42613: Fix javascript error This change adds the "optional chaining ?." operator so that it returns undefined instead of throwing an error. Test plan: 0. Do NOT apply the patch 1. Create a Subscription in the Serials module 2. Open your F12 tools 3. Note on subscription-detail.pl that there is a Javascript error 4. Apply the patch 5. Refresh the page and note that there is no longer a Javascript error 6. To test that the datatable actually works, create a basket for a vendor and create an order for that basket using "From subscription" and choose your subscription 7. Reload subscription-detail.pl and click on "Acquisition details" 8. Note that the DataTable appears (and there's still no Javascript errors) 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=42613 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Javascript error on |[<= 25.11] Javascript error |subscription-detail.pl if |on subscription-detail.pl |no orders (part deux) |if no orders (part deux) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42613 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|Signed Off |RESOLVED CC| |jonathan.druart@gmail.com --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Bug 42277 has been backported into 25.11. I don't understand why we have this separate bug report. Can you clarify? *** This bug has been marked as a duplicate of bug 42277 *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42613 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #3)
Bug 42277 has been backported into 25.11. I don't understand why we have this separate bug report.
Can you clarify?
*** This bug has been marked as a duplicate of bug 42277 ***
No idea why there's a separate bug report. I imagine that bug 42277 just didn't come up when I was investigating this issue. Bug 42611 and bug 42612 were all reported around the same time, so it could just be that I was distracted and focused on fixing the bugs at hand. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42613 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- Actually I'm guessing the duplicate might also be because of the delays in backporting of bug fixes over the last while. When this report was raised, bug 42277 had been pushed to main almost a month earlier, so maybe I thought it wasn't going to be backported. Not sure now. It was a couple months ago. It is a bit weird though... I noticed the fix in main from bug 42277 so I don't know why I didn't just comment there asking for the backport. Strange... -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org