[Bug 18185] New: Clears loan history
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18185 Bug ID: 18185 Summary: Clears loan history Change sponsored?: --- Product: Koha Version: 16.11 Hardware: All OS: Linux Status: NEW Severity: critical Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: freddyguerr@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com When returning an item and reviewing the loan history, it does not appear in the loan history, I use koha v. 16.11, Debian 8. -- 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=18185 Fred <freddyguerr@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |freddyguerr@gmail.com --- Comment #1 from Fred <freddyguerr@gmail.com> --- Created attachment 60749 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60749&action=edit Chronology of error Chronology of error in image -- 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=18185 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> --- Something in the logs? -- 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=18185 --- Comment #3 from Fred <freddyguerr@gmail.com> --- (In reply to Jonathan Druart from comment #2)
Something in the logs?
In the log you do not see any errors -- 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=18185 Ricardo Vargas <ricvargasmed@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ricvargasmed@gmail.com --- Comment #4 from Ricardo Vargas <ricvargasmed@gmail.com> --- To reproduce this error I did the following. - Provide a copy to a user - Check movement history - All loans that the user has - Return the sample - Check movement history - The user loans will be displayed, without the last one returned Note: sometimes I save the returns, but the 3 exercises reproduced the error. Tested on Koha 16.05 and 16.11 installed by packages in Debian 8 and Ubuntu 16.04 LTS -- 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=18185 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Ricardo, I cannot recreate on 16.11.04 (using MariaDB). Can you confirm that you are not using MySQL in strict mode? See https://wiki.koha-community.org/wiki/Koha_on_ubuntu_-_packages#Ubuntu_16.04_... -- 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=18185 --- Comment #6 from Fred <freddyguerr@gmail.com> --- Change from mysql to mariaDB without success, the error is maintained, I have Debian 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=18185 --- Comment #7 from Fred <freddyguerr@gmail.com> --- mysql Ver 15.1 Distrib 10.0.29-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 Server version: Apache/2.4.10 (Debian) -- 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=18185 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Can you provide a screencast? -- 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=18185 --- Comment #9 from Ricardo Vargas <ricvargasmed@gmail.com> --- This is the screencast. http://autode.sk/2na3tNf -- 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=18185 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I think you face the same problem as bug 18003, but for issues. To confirm it, try: 1. Issue an item for a patron, note the itemnumber of this item 2. Get the issue id of this issue: SELECT issue_id FROM issues WHERE itemnumber=ITEMNUMBER; If you do not know the item number, you can get it from the barcode with: SELECT itemnumber FROM items where barcode="BARCODE"; Then check if this issue_id already exists in the old_issues table: SELECT COUNT(*) FROM old_issues WHERE issue_id=ISSUE_ID -- 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=18185 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18003 -- 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=18185 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18242 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- See also bug 18242. -- 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=18185 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 60966 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60966&action=edit Bug 18185: [SOLUTION 1]DB changes - remove PK on old_issues.issue_id -- 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=18185 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 60967 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60967&action=edit Bug 18185: [SOLUTION 1]Schema changes -- 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=18185 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 60968 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60968&action=edit Bug 18185: [SOLUTION 1]Remove primary key on old_issues.issue_id The table old_issues has a primary key defined on the issue_id column. This issue_id comes from the issues table when an item is checked in. In some case the value of issue_id already exists in the table Basically this happens when an item is returned and mysqld is restarted: The auto increment value for issues.issue_id will be reset to MAX(issue_id)+1 (which is the value of the last entry of old_issues). See also the description of bug 18003 for more informations. The easier solution seems to add a new column id as a primary key. The changes to the codebase are very small. However this will raise few problems: - We can no longer assume that accountlines.issue_id==old_issues.id (I guess it is problematic). - Code in Koha::REST::V1::_object_ownership_by_checkout_id is wrong assuming that old_issues.issuing_id is unique -- 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=18185 J Schmidt <jschmidt@switchinc.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jschmidt@switchinc.org --- Comment #15 from J Schmidt <jschmidt@switchinc.org> --- Can I ask what is the starting Koha version that's impacted by this bug? 16.05 or earlier? 16.11? thank you. -- 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=18185 --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to J Schmidt from comment #15)
Can I ask what is the starting Koha version that's impacted by this bug? 16.05 or earlier? 16.11? thank you.
This bug impacts all Koha versions, but only in very specific cases. Basically it happens if you restart the DBMS and that the last item that has been checked out is checked in. In that case the auto increment value of the issue table become lower than the max value of old_issues.issue_id After the restart, the next issue will get an issue_id that already exists in the old_issues table. When this issue will be checked in and moved to the old_issue table, the copy of the data to the old_issues table will fail and the row will be deleted from the issues table => data are lost! -- 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=18185 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60966|0 |1 is obsolete| | -- 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=18185 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60967|0 |1 is obsolete| | -- 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=18185 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60968|0 |1 is obsolete| | -- 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=18185 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|NEW |RESOLVED --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Marked as a duplicate of bug 18242, please reopen if it does not fix your issue. *** This bug has been marked as a duplicate of bug 18242 *** -- 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=18185 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|16.11 |unspecified -- 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