[Bug 13482] New: A race condition prevents item info from being available for ReserveSlip (hold notice) printing.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Bug ID: 13482 Summary: A race condition prevents item info from being available for ReserveSlip (hold notice) printing. 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: olli-antti.kivilahti@jns.fi QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Occasionally the ReserveSlip doesn't have any values from the koha.items-table. There is no apparent reason why. The issue seems to be more prevalent when fulfilling holds (checkin-in) to be transferred to another branch. Traced the issues to a race condition between printing a just-fulfilled hold and writing the itemnumber to the reserves-table. Can be reproduced by entering the following to a javascript console. Dopop('hold-transfer-slip.pl?transfer=1&borrowernumber=10904891&biblionumber=469263&op=slip'); After this patch, one can confirm that it works by using this command: Dopop('hold-transfer-slip.pl?transfer=1&borrowernumber=10904891&biblionumber=469263&itemnumber=10563811&op=slip'); MAKE SURE TO REPLACE PARAMETERS WITH CORRECT VALUES. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |olli-antti.kivilahti@jns.fi |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 --- Comment #1 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 34528 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34528&action=edit Bug 13482 - A race condition prevents item info from being available for ReserveSlip (hold notice) printing. Occasionally the ReserveSlip doesn't have any values from the koha.items-table. There is no apparent reason why. The issue seems to be more prevalent when fulfilling holds (checkin-in) to be transferred to another branch. Traced the issues to a race condition between printing a just-fulfilled hold and writing the itemnumber to the reserves-table. TEST PLAN: 1. Find a borrower, make a hold for him, and check-in the book to trigger the "Hold found:"-prompt. Do not Confirm it! 2. Reproduce the print error by entering the following to a javascript console at the same page. Dopop('hold-transfer-slip.pl?transfer=1&borrowernumber=10904891&biblionumber=469263&op=slip'); 3. Notice the missing item fields. After this patch, one can confirm that it works by using this command: Dopop('hold-transfer-slip.pl?transfer=1&borrowernumber=10904891&biblionumber=469263&itemnumber=10563811&op=slip'); MAKE SURE TO REPLACE PARAMETERS WITH CORRECT VALUES. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34528|0 |1 is obsolete| | --- Comment #2 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 34529 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34529&action=edit Bug 13482 - A race condition prevents item info from being available for ReserveSlip (hold notice) printing. Occasionally the ReserveSlip doesn't have any values from the koha.items-table. There is no apparent reason why. The issue seems to be more prevalent when fulfilling holds (checkin-in) to be transferred to another branch. Traced the issues to a race condition between printing a just-fulfilled hold and writing the itemnumber to the reserves-table. TEST PLAN: 1. Find a borrower, make a hold for him, and check-in the book to trigger the "Hold found:"-prompt. Do not Confirm it! 2. Reproduce the print error by entering the following to a javascript console at the same page. Dopop('hold-transfer-slip.pl?transfer=1&borrowernumber=10904891&biblionumber=469263&op=slip'); 3. Notice the missing item fields. After this patch, one can confirm that it works by using this command: Dopop('hold-transfer-slip.pl?transfer=1&borrowernumber=10904891&biblionumber=469263&itemnumber=10563811&op=slip'); MAKE SURE TO REPLACE PARAMETERS WITH CORRECT VALUES. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=7255, | |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12514 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Could this be a duplicate to bug 12514 and bug 7255? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #3)
Could this be a duplicate to bug 12514 and bug 7255?
Yes, I believe those should be marked as duplicates of this bug. The one has no patches, and the other has a patch that will never pass qa. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34529|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 35664 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35664&action=edit [SIGNED-OFF] Bug 13482 - A race condition prevents item info from being available for ReserveSlip (hold notice) printing. Occasionally the ReserveSlip doesn't have any values from the koha.items-table. There is no apparent reason why. The issue seems to be more prevalent when fulfilling holds (checkin-in) to be transferred to another branch. Traced the issues to a race condition between printing a just-fulfilled hold and writing the itemnumber to the reserves-table. TEST PLAN: 1. Find a borrower, make a hold for him, and check-in the book to trigger the "Hold found:"-prompt. Do not Confirm it! 2. Reproduce the print error by entering the following to a javascript console at the same page. Dopop('hold-transfer-slip.pl?transfer=1&borrowernumber=10904891&biblionumber=469263&op=slip'); 3. Notice the missing item fields. After this patch, one can confirm that it works by using this command: Dopop('hold-transfer-slip.pl?transfer=1&borrowernumber=10904891&biblionumber=469263&itemnumber=10563811&op=slip'); MAKE SURE TO REPLACE PARAMETERS WITH CORRECT VALUES. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m Status|Signed Off |Failed QA --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Olli, could you please provide a couple of tests for this change? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Would be nice to see this moving - I could reproduce the issue whenever a hold is confirmed for the first time in Koha 3.18.5.1. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 37956 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37956&action=edit [ALTERNATIVE PATCH] Bug 13482: Prevent race condition on printing a ReserveSlip The problem has been well described by Kyle and Nicole on bug 7255 description and comment 1. With this counter patch, I suggest to popup AFTER the return has been confirmed. This will remove the race condition and avoid to pass itemnumber to the pl file as in the patch submitted by Olli. Only the borrowernumber and biblionumber are needed (transfer and op are never used by circ/hold-transfer-slip.pl). Test plan: It is very hard to know all cases (at least 6) where the popup is displayed. Try at least to get the hold and the transfer confirmation messages. You should get the popup if you click on "print slip" button. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barton@bywatersolutions.com --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 12514 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 7255 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Marjorie Barry-Vila <marjorie.barry-vila@ccsr.qc.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@ccsr.qc | |.ca -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- Tested alternate patch, I receive no popup print notice on the initial checkin, print & confirm hold, but I do on the second time around: http://screencast.com/t/s7lnVcBwox -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37956|0 |1 is obsolete| | --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 38234 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38234&action=edit [ALTERNATIVE PATCH] Bug 13482: Prevent race condition on printing a ReserveSlip The problem has been well described by Kyle and Nicole on bug 7255 description and comment 1. With this counter patch, I suggest to popup AFTER the return has been confirmed. This will remove the race condition and avoid to pass itemnumber to the pl file as in the patch submitted by Olli. Only the borrowernumber and biblionumber are needed (transfer and op are never used by circ/hold-transfer-slip.pl). Test plan: It is very hard to know all cases (at least 6) where the popup is displayed. Try at least to get the hold and the transfer confirmation messages. You should get the popup if you click on "print slip" button. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 --- Comment #13 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Kyle M Hall from comment #11)
Tested alternate patch, I receive no popup print notice on the initial checkin, print & confirm hold, but I do on the second time around:
The print_slip hidden input was not set to 1 for 1 button, the one you tested :) Please try again. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38234|0 |1 is obsolete| | --- Comment #14 from Mirko Tietgen <mirko@abunchofthings.net> --- Created attachment 38282 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38282&action=edit Bug 13482: Prevent race condition on printing a ReserveSlip The problem has been well described by Kyle and Nicole on bug 7255 description and comment 1. With this counter patch, I suggest to popup AFTER the return has been confirmed. This will remove the race condition and avoid to pass itemnumber to the pl file as in the patch submitted by Olli. Only the borrowernumber and biblionumber are needed (transfer and op are never used by circ/hold-transfer-slip.pl). Test plan: It is very hard to know all cases (at least 6) where the popup is displayed. Try at least to get the hold and the transfer confirmation messages. You should get the popup if you click on "print slip" button. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mirko@abunchofthings.net Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35664|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I found a problem, I hope this will be enough to reproduce: It's a transfer slip with a hold. What I did: - record with 1 item - staff user is in Midway - place record level hold with pickup location Fairfield - check item in in Midway - transfer slip is triggered (status is transfer now) - check the item in a second time in Midway - transfer slip is triggered BUT: Slip reads: no hold found Without the patch the slip is printed correctly. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 --- Comment #16 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 38304 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38304&action=edit Bug 13482: Sent biblionumber to the template The biblionumber is sent to the template as 'itembiblionumber' at 1 place, the template get the 'biblionumber' variable. I don't understand why but the easy way is to sent the variable twice. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 --- Comment #17 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Katrin Fischer from comment #15)
I found a problem, I hope this will be enough to reproduce:
It's a transfer slip with a hold.
What I did: - record with 1 item - staff user is in Midway - place record level hold with pickup location Fairfield - check item in in Midway - transfer slip is triggered (status is transfer now) - check the item in a second time in Midway - transfer slip is triggered BUT: Slip reads: no hold found Without the patch the slip is printed correctly.
Good catch Katrin. This template is a mess, I tried to fix the problem easily. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38282|0 |1 is obsolete| | Attachment #38304|0 |1 is obsolete| | --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 38359 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38359&action=edit [PASSED QA] Bug 13482: Prevent race condition on printing a ReserveSlip The problem has been well described by Kyle and Nicole on bug 7255 description and comment 1. With this counter patch, I suggest to popup AFTER the return has been confirmed. This will remove the race condition and avoid to pass itemnumber to the pl file as in the patch submitted by Olli. Only the borrowernumber and biblionumber are needed (transfer and op are never used by circ/hold-transfer-slip.pl). Test plan: It is very hard to know all cases (at least 6) where the popup is displayed. Try at least to get the hold and the transfer confirmation messages. You should get the popup if you click on "print slip" button. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 38360 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38360&action=edit [PASSED QA] Bug 13482: Sent biblionumber to the template The biblionumber is sent to the template as 'itembiblionumber' at 1 place, the template get the 'biblionumber' variable. I don't understand why but the easy way is to sent the variable twice. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #20 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbrannon@cdalibrary.org Status|Pushed to Master |In Discussion --- Comment #21 from Christopher Brannon <cbrannon@cdalibrary.org> --- Found an issue with this patch. Although most content now appears on first printing, it appears that the items.holdingbranch has incorrect data on first scan of item. It seems it prints the library code of the library receiving the item on the first scan. If you scan it again, it then shows the correct library code (the library that is scanning the item). Before the patch, this field was blank on first scan. Now it has the incorrect information on first scan. Christopher -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Passed QA --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Christopher, this patch is already pushed - so it would be better to have the problem description on a separate bug depending on this one and linkng them. Can you tell which slip is the one that prints the wrong information? With a step by step instruction maybe? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14099 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 --- Comment #23 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Bug 14099 - thx Christopher! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #24 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.18.x will be in 3.18.7 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13482 Pongtawat <pongtawat@punsarn.asia> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pongtawat@punsarn.asia --- Comment #25 from Pongtawat <pongtawat@punsarn.asia> --- As a note, this change cause print window pop-up to be blocked by default by both Firefox and Chrome. In previous behavior, a print window pop-up is created when the print button is clicked so most browsers will allow it. In the new behavior, a print pop-up is created when the page reload, hence most browsers will block it by default. So now we have to explicitly set the browser to allow pop-up from Koha staff interface. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org