[Bug 26627] New: Print and confirming a hold can cause an infinite loop
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Bug ID: 26627 Summary: Print and confirming a hold can cause an infinite loop Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com See bug 25907 and comment 21 from bug 25969 To recreate: 1 - Place a hold for pickup at library A 2 - Confirm the hold and print slip 3 - Checkin the item again 3 - Confirm the hold and print slip 4 - The modal returns, do it again 5 - and again 6 - and again -- 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=26627 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |25907 See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=25969, | |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26485 Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25907 [Bug 25907] When cancelling a waiting hold on returns.pl, looks for new hold to fill without rescanning barcode -- 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=26627 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 111337 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111337&action=edit Bug 26627: Print and confirming a hold can cause an infinite loop Test plan: 1) Place a hold for pickup at library A 2) Confirm the hold and print slip 3) Checkin the item again 4) Confirm the hold and print slip 5) The modal returns, do it again 6) Apply this patch 7) Reload the page 8) Repeat steps 1-3 9) No loop! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |25969 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25969 [Bug 25969] Checking in a found hold at a different branch then confirming the hold causes internal server error -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |26485 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26485 [Bug 26485] Simplify itemnumber handling in returns.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Nick, why did you link this bug report with bug 26485? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #2)
Nick, why did you link this bug report with bug 26485?
I tested them all together, without the dependencies I was still seeing issues -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Séverine Queune <severine.queune@bulac.fr> 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=26627 Séverine Queune <severine.queune@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111337|0 |1 is obsolete| | --- Comment #4 from Séverine Queune <severine.queune@bulac.fr> --- Created attachment 111635 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111635&action=edit Bug 26627: Print and confirming a hold can cause an infinite loop Test plan: 1) Place a hold for pickup at library A 2) Confirm the hold and print slip 3) Checkin the item again 4) Confirm the hold and print slip 5) The modal returns, do it again 6) Apply this patch 7) Reload the page 8) Repeat steps 1-3 9) No loop! Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111635|0 |1 is obsolete| | --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111805 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111805&action=edit Bug 26627: Print and confirming a hold can cause an infinite loop Test plan: 1) Place a hold for pickup at library A 2) Confirm the hold and print slip 3) Checkin the item again 4) Confirm the hold and print slip 5) The modal returns, do it again 6) Apply this patch 7) Reload the page 8) Repeat steps 1-3 9) No loop! Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Interesting bug! Note: it has to be "print slip..." with just confirm the loop doesn't happen. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@helsinki.fi --- Comment #8 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- The fix here seems to have created another problem, it causes the button "Print slip, transfer, and confirm" to not do anything when clicked. In Javascript console I see Uncaught TypeError: this.form.barcode is undefined /cgi-bin/koha/circ/returns.pl:31317 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 113093 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113093&action=edit Bug 26627: (QA follow-up) Remove barcode input by id -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #10 from Magnus Enger <magnus@libriotech.no> --- It looks like the first patch is "Pushed to master", but nothin has been done about the second patch from Kyle. Should it go on a separate bug, or should the status here be reset to "Needs signoff"? Joonas: Have you tested if the second patch solves your problem? BTW: This needs to be backported to 20.05.x, I think. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 --- Comment #11 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- I just tested and the QA follow-up here didn't solve the issue, in browser console I get: document.getElementById(...) is null So I'm creating first a hold to item and select a pickup location to something other than where the item is currently, then I check-in the item and I want to confirm the hold and print slip & transfer but this happens. Let me see if I will find a fix for this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 --- Comment #12 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- My guess is that this would work if the hold was item level, but I made biblio level hold meaning there is no specific barcode attached to the hold, thus the error. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113093|0 |1 is obsolete| | --- Comment #13 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 113237 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113237&action=edit Bug 26627: (QA follow-up) Remove only the loop causing input field The loop reported originally happened only in this one specific form which this commit now removes the input field from. There is no need to remove the barcode from all the forms (even ones that don't have it). Because the JavaScript tried to remove the barcode input field from other forms as well we got following error when clicking "Print slip, transfer, and confirm" for a hold that needed transfer: Uncaught TypeError: this.form.barcode is undefined Test plan: 1) Create biblio level hold that needs a transfer 2) Check-in the item and click "Print slip, transfer, and confirm" 3) Notice nothing happens, apply patch & restart, notice the slip will be now printed 4) Follow the test plan from commit a71596fb39 (Bug 26627: Print and confirming a hold can cause an infinite loop) Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 --- Comment #14 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- I re-did now basically the original patch by removing the unneeded HTML input directly from the HTML code instead of using Javascript to do it. Asking now for someone else to sign-off this as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 --- Comment #15 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Joonas Kylmälä from comment #14)
I re-did now basically the original patch by removing the unneeded HTML input directly from the HTML code instead of using Javascript to do it. Asking now for someone else to sign-off this as well.
This patch has effectively undone bug 25907 and would create a regression. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113093|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113093|0 |1 is obsolete| | --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 113249 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113249&action=edit Bug 26627: (QA follow-up) Remove barcode input by id -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 --- Comment #17 from Kyle M Hall <kyle@bywatersolutions.com> --- I think this latest version should solve all the problems! Would you mind testing? Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 --- Comment #18 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Kyle M Hall from comment #16)
Created attachment 113249 [details] [review] Bug 26627: (QA follow-up) Remove barcode input by id
Thanks, I was just commenting the following and your patch seems to be what I wanted:
I think we should have separate forms for each one of the actions (confirm, print and confirm, cancel). Though it would be nice to have a fast fix for this without huge possibility of regression so maybe adding and if check whether the HTML element this.form.barcode exists would be good enough solution for now.
I will test now your patch and sign-it off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113237|0 |1 is obsolete| | Attachment #113249|0 |1 is obsolete| | --- Comment #19 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 113250 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113250&action=edit Bug 26627: (QA follow-up) Remove barcode input by id Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 --- Comment #20 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Works now as expected, signing-off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 --- Comment #21 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Joonas Kylmälä from comment #19)
Created attachment 113250 [details] [review] Bug 26627: (QA follow-up) Remove barcode input by id
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Patch pushed to master for 20.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.11.00 |20.11.00, 20.05.06 released in| | CC| |lucas@bywatersolutions.com Status|Pushed to master |Pushed to stable --- Comment #22 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 20.05.x for 20.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz --- Comment #23 from Aleisha Amohia <aleisha@catalyst.net.nz> --- missing dependencies, not backported to 19.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org