[Bug 23529] New: Interlibrary loan javascript is broken
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23529 Bug ID: 23529 Summary: Interlibrary loan javascript is broken Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: ILL Assignee: koha-bugs@lists.koha-community.org Reporter: andrew.isherwood@ptfs-europe.com This was caused by an overzealous fix in Bug 23229. A fix was appended as a follow-up patch on 23229 but Katrin advised that it should be a new bug, hence this one. -- 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=23529 --- Comment #1 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Created attachment 92533 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92533&action=edit Bug 23529: Narrow scope of changed Whilst working on something else, it came to light that the previous fix in bug 23229 was waaaaay too heavy handed and basically kills all ILL related JS :( This is obviously a big problem, this patch fixes that. The main problem is that all the ILL related JS is in a single file, which isn't ideal as bits of it are used on different pages. Ideally, we'd refactor it out into more manageable chunks which can be included as required. Until such a time, this patch will do, it just prevents the "get all requests" AJAX request unless you're on the ILL list page. -- 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=23529 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P1 - high Depends on| |23229 Status|NEW |Needs Signoff CC| |katrin.fischer@bsz-bw.de Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23229 [Bug 23229] "Get all requests" API call fired when loading any ILL page -- 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=23529 --- Comment #2 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Test plan: - Go to "ILL requests" page - TEST: Observe that the table loads all ILL requests - Go to the "New ILL request" page for any installed backend - TEST: Check the browser dev tools "Network" panel, observe that the /api/v1/illrequests?embed=metadata,patron,capabilities,library,status_alias,comments,requested_partners request is not made. - Go to "Manage request" page for a request - TEST: Check that the "ILL request log" and "Display supplier metadata" buttons work -- 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=23529 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- I get an error when testing this: SyntaxError: missing ) after argument list ill-list-table_19.0600022.js:502: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=23529 --- Comment #4 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Created attachment 92545 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92545&action=edit Bug 23529: (follow-up) Fix syntax error As mentioned in comment #3 -- 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=23529 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #5 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Sorry Owen, bad commit! What's super weird is that, although I could see the syntax error in my editor, my browser wasn't complaining about it! Hence me not catching if before I attached the patch. Anyway, it should be fixed now. Apologies for that! -- 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=23529 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #6 from Magnus Enger <magnus@libriotech.no> --- Two problems: 1. I can't for the life of me recreate the original problem, if the problem was that /api/v1/illrequests?embed=metadata,patron,capabilities,library,status_alias,comments,requested_partners was getting called on the "New ILL request" pages for Dummy and FreeForm 2. After applying the patch I get a JS error in the console: "Uncaught SyntaxError: missing ) after argument list" and then it points to ill-list-table_19.0600029.js:501. -- 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=23529 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- 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=23529 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #7 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Hi Magnus Thanks for looking at this.
I can't for the life of me recreate the original problem [...]
The reason you can't recreate the problem is that it was fixed in Bug 23229, which is now in master. However, that fix was too far reaching and causes ILL JS to be broken. For example, without this bug applied, try clicking on "ILL request log" on the "Manage request" page, it doesn't work. This bug, once applied, fixes that problem.
After applying the patch I get a JS error in the console [...]
I can't replicate that. I applied the patch and it all worked fine. Are you sure you hard refreshed your browser to pick up the new JS? -- 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=23529 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #8 from Magnus Enger <magnus@libriotech.no> --- The second patch does not quite fix the syntax problems, I think. As far as I can see, the "if" that starts like this: 366 if (window.location.search.length == 0) { 367 var ajax = $.ajax( 368 '/api/v1/illrequests?embed=metadata,patron,capabilities,library,status_alias,comments,requested_partners' 369 + filterParam 370 ).done(function() { has to be closed like this, or the parens and brackets don't add up: 497 return placedPassed && modifiedPassed; 498 499 }); 500 501 }); 502 } -- 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=23529 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #92545|0 |1 is obsolete| | --- Comment #9 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Created attachment 94657 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94657&action=edit Bug 23529: (follow-up) Fix syntax error As mentioned by Magnus in comment #8 Sorry Magnus, definitely fixed this time! -- 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=23529 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |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=23529 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=23529 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #92533|0 |1 is obsolete| | Attachment #94657|0 |1 is obsolete| | --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 94744 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94744&action=edit Bug 23529: Narrow scope of changed Whilst working on something else, it came to light that the previous fix in bug 23229 was waaaaay too heavy handed and basically kills all ILL related JS :( This is obviously a big problem, this patch fixes that. The main problem is that all the ILL related JS is in a single file, which isn't ideal as bits of it are used on different pages. Ideally, we'd refactor it out into more manageable chunks which can be included as required. Until such a time, this patch will do, it just prevents the "get all requests" AJAX request unless you're on the ILL list page. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- 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=23529 --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 94745 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94745&action=edit Bug 23529: (follow-up) Fix syntax error As mentioned by Magnus in comment #8 Sorry Magnus, definitely fixed this time! Signed-off-by: Nick Clemens <nick@bywatersolutions.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=23529 --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 94746 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94746&action=edit Bug 23529: (QA follow-up) Fix closing bracket, add label Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- 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=23529 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Heh, changed: if (window.location.search.length == 0) {} To: if (window.location.search.length == 0) { -- 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=23529 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.11.00 released in| | Status|Passed QA |Pushed to master -- 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=23529 --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- 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=23529 --- Comment #15 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Is there any chance of this being backported to 18.11.x? Without it, ILL Javascript is completely broken in 18.11.x. -- 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=23529 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23529 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It needs to go into 19.05 first - adding Fridolin und Lucas. As discussed at the IRC meeting today, you might want to email them. -- 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=23529 --- Comment #17 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Actually, hold off on that last request... It may not actually be the case. Just trying to determine what the heck is going on. -- 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=23529 --- Comment #18 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- OK, ignore me. Nothing needs doing here. Sorry for the noise. -- 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=23529 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|19.11.00 |19.11.00,19.05.05 released in| | Status|Pushed to master |Pushed to stable --- Comment #19 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 19.05.x for 19.05.05 -- 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