[Bug 19487] New: Internal server error when writing off lost fine for item not checked out
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 Bug ID: 19487 Summary: Internal server error when writing off lost fine for item not checked out Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major 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 To recreate: 1 - Manually add a lost fine to a ptron and include a barcode 2 - Attempt to write off the fine 3 - Internal server error 4 - Checkout an item and mark lost to checkin and fine 5 - Attempt to write off line 6 - Internal server error It appears we are trying to move a non-existent issue to old_issues -- 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=19487 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=19487 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 68275 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68275&action=edit Bug 19487: Do not return an item if not checked out To recreate: 1 - Manually add a lost fine to a ptron and include a barcode 2 - Attempt to write off the fine 3 - Internal server error 4 - Checkout an item and mark lost to checkin and fine 5 - Attempt to write off line 6 - Internal server error -- 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=19487 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org Severity|major |critical --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Upping severity, it affects stable release (at least 17.05.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=19487 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68275|0 |1 is obsolete| | --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 68293 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68293&action=edit Bug 19487: Do not return an item if not checked out To recreate: 1 - Manually add a lost fine to a ptron and include a barcode 2 - Attempt to write off the fine 3 - Internal server error 4 - Checkout an item and mark lost to checkin and fine 5 - Attempt to write off line 6 - Internal server error 7 - Apply patch 8 - Repeat without errors Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 Nick Clemens <nick@bywatersolutions.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=19487 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- perl t/db_dependent/Circulation/MarkIssueReturned.t 1..2 not ok 1 # Failed test at t/db_dependent/Circulation/MarkIssueReturned.t line 50. # '' # doesn't match '(?^u:Fatal error: the patron \(\d+\) .* AnonymousPatron)' ok 2 # Looks like you failed 1 test of 2. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 68294 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68294&action=edit Bug 19487: Fix MarkIssueReturned.t MarkIssueReturned must now return directly if the issue does not exist. We then check if the anonymous patron configuration is correct. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA: Looking here now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68294|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 68312 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68312&action=edit Bug 19487: Fix MarkIssueReturned.t MarkIssueReturned must now return directly if the issue does not exist. We then check if the anonymous patron configuration is correct. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 68313 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68313&action=edit Bug 19487: (QA follow-up) More changes to MarkIssueReturned.t $dbh is not used $categorycode is no longer used %item_branch_infos not used $borrowernumber is obsoleted by using $patron No real need for $anonymous_borrowernumber No AddMember calls, removing unneeded modules Adding a test that calls MarkIssueReturned on an item already returned. Test plan: [1] Without the patch changing MarkIssueReturned, this test fails (3 of 6). [2] With the patch, the test should pass. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68293|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 68314 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68314&action=edit Bug 19487: Do not return an item if not checked out To recreate: 1 - Manually add a lost fine to a ptron and include a barcode 2 - Attempt to write off the fine 3 - Internal server error 4 - Checkout an item and mark lost to checkin and fine 5 - Attempt to write off line 6 - Internal server error Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68313|0 |1 is obsolete| | --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Comment on attachment 68313 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68313 Bug 19487: (QA follow-up) More changes to MarkIssueReturned.t I am not willing to push this patch. We want a fix for stable releases, so something easy to backport. This change is quite big may slow down the backport. Moreover it seems that at least one test has been removed: -unlike ( $@, qr<Fatal error: the patron \(\d+\) .* AnonymousPatron>, ); and this line too, which makes me think you cut a bit too much: t::lib::Mocks::mock_preference('AnonymousPatron', $anonymous_borrowernumber); Please move it to its own bug report. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 68330 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68330&action=edit Bug 19487: Refetch the object to get up-to-date values This has been raised by failures on t/db_dependent/Circulation/issue.t (thanks tests!) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.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=19487 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #10)
Comment on attachment 68313 [details] [review] Bug 19487: (QA follow-up) More changes to MarkIssueReturned.t
I am not willing to push this patch. But you wanted to be RM ;)
We want a fix for stable releases, so something easy to backport. This change is quite big may slow down the backport. OK OK
Moreover it seems that at least one test has been removed: -unlike ( $@, qr<Fatal error: the patron \(\d+\) .* AnonymousPatron>, ); No it isnt. This one is even sharper.. +is( $@, '', 'No die triggered by invalid itemnumber' );
and this line too, which makes me think you cut a bit too much: t::lib::Mocks::mock_preference('AnonymousPatron', $anonymous_borrowernumber); Yes I removed it since it was made useless by the previous changes. When you pass a wrong item number, MarkIssueReturned will now return undef rightaway. The whole anynomous stuff is not in reach. Leaving it in could reflect that we are testing it, while we are not.
Please move it to its own bug report. Bug 19513
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19513 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19513 [Bug 19513] More changes to MarkIssueReturned.t (after bug 19487) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |fridolin.somers@biblibre.co | |m --- Comment #14 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.05.x, will be in 17.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- These patches have been pushed to 16.11.x and will be in 16.11.14. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19776 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19776 [Bug 19776] Test failing randomly - fix categorycode vs category_type -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19487 Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@collect | |o.ca -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org