[Bug 27004] New: Deleting a staff account who have created claims returned causes problem in the return_claims table because of a NULL value in return_claims.created_by.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004 Bug ID: 27004 Summary: Deleting a staff account who have created claims returned causes problem in the return_claims table because of a NULL value in return_claims.created_by. Change sponsored?: --- Product: Koha Version: 19.11 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: enica@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com When a staff deletes another staff member's staff account and that particular account happens to have created return_claims, it creates a NULL value in the return_claims.created_by, causing a problem when another staff tries to resolve the claims. On the patron's account Claim tab, when one tries to resolve the claim, it will perpetually load without doing anything. Only way to fix is update the NULL value on the created_by and add a borrowernumber. Is there a way to transfer the claim to a different staff account? Should Koha allow the deletion of an account when there are still return_claims unresolved? -- 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=27004 Lisette Scheer <lisetteslatah@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisetteslatah@gmail.com --- Comment #1 from Lisette Scheer <lisetteslatah@gmail.com> --- (In reply to Enica Davis from comment #0)
Should Koha allow the deletion of an account when there are still return_claims unresolved?
I think yes, either by transferring to another account or by storing a "dead" borrowernumber like in the reports table. -- 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=27004 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Could setting to NULL also be an option? I think it might work better with FK constraints than allowing a "dead" one :) -- 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=27004 --- Comment #3 from Lisette Scheer <lisetteslatah@gmail.com> --- (In reply to Katrin Fischer from comment #2)
Could setting to NULL also be an option? I think it might work better with FK constraints than allowing a "dead" one :)
Yeah I think that would 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=27004 --- Comment #4 from Enica Davis <enica@bywatersolutions.com> --- That's the problem: NULL value on return_claims.created_by would cause a problem in the staff client if you try to resolve the claim. The "Resolve" button would perpetually spin. It's a minor issue that the only quick fix is to update the database and assign a borrowernumber to return_claims.created_by. :( -- 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=27004 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Ok, so we can fix this outside the database and teach it to work with NULL borrowernumber then? -- 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=27004 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |normal -- 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=27004 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 Status|NEW |ASSIGNED CC| |jonathan.druart@bugs.koha-c | |ommunity.org Version|19.11 |unspecified Severity|normal |major -- 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=27004 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |14697 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14697 [Bug 14697] Extend and enhance "Claims returned" lost status -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 114547 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114547&action=edit Bug 27004: Prevent claim resolution to fail If the account of the patron who created a claim is removed, then the claim won't be resolvable. Trying to resolve the claim will result in a 500: [2020/12/21 10:05:55] [ERROR] PUT /api/v1/return_claims/1/resolve: unhandled exception (Koha::Exceptions::Checkouts::ReturnClaims::NoCreatedBy)<<[created_by is mandatory]>> Koha::REST::Plugin::Exceptions::__ANON We should not check if created_by exist when we update an existing hold, only when we create it. Test plan: - Login with patron A - Check an item in - Claim returned it - Login with patron B - Delete patron A - Resolve the claim -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- QA: should not we have a test/exception for resolved_by? We have one for created_by, it would make sense to have the same behaviour for *_by fields. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114547|0 |1 is obsolete| | --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 114573 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114573&action=edit Bug 27004: Prevent claim resolution to fail If the account of the patron who created a claim is removed, then the claim won't be resolvable. Trying to resolve the claim will result in a 500: [2020/12/21 10:05:55] [ERROR] PUT /api/v1/return_claims/1/resolve: unhandled exception (Koha::Exceptions::Checkouts::ReturnClaims::NoCreatedBy)<<[created_by is mandatory]>> Koha::REST::Plugin::Exceptions::__ANON We should not check if created_by exist when we update an existing hold, only when we create it. Test plan: - Login with patron A - set a value to syspref ClaimReturnedLostValue - Check an item out - Claim returned it - Login with patron B - Delete patron A - Resolve the claim - ERROR in api-error.log an UI never confirming the resolution - apply patch & restart services - Resolve the claim - it works Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |victor@tuxayo.net --- Comment #9 from Victor Grousset/tuxayo <victor@tuxayo.net> --- It works :) Completed test plan + fixed "Check an item in" => "Check an item out" (maybe it's actually doable with a checkin) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114573|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 114732 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114732&action=edit Bug 27004: Regression tests This patch introduces regression tests for the change in Koha::Checkouts::ReturnClaim->store. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Checkouts/ReturnClaim.t => FAIL: Tests fail Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 114733 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114733&action=edit Bug 27004: Prevent claim resolution to fail If the account of the patron who created a claim is removed, then the claim won't be resolvable. Trying to resolve the claim will result in a 500: [2020/12/21 10:05:55] [ERROR] PUT /api/v1/return_claims/1/resolve: unhandled exception (Koha::Exceptions::Checkouts::ReturnClaims::NoCreatedBy)<<[created_by is mandatory]>> Koha::REST::Plugin::Exceptions::__ANON We should not check if created_by exist when we update an existing hold, only when we create it. Test plan: - Login with patron A - set a value to syspref ClaimReturnedLostValue - Check an item out - Claim returned it - Login with patron B - Delete patron A - Resolve the claim - ERROR in api-error.log an UI never confirming the resolution - apply patch & restart services - Resolve the claim - it works Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.05.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=27004 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, 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=27004 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable Version(s)|21.05.00 |21.05.00,20.11.01 released in| | --- Comment #13 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|21.05.00,20.11.01 |21.05.00,20.11.01,20.05.07 released in| | CC| |andrew@bywatersolutions.com --- Comment #14 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00,20.11.01,20.05.07 |21.05.00,20.11.01,20.05.07, released in| |19.11.14 Status|Pushed to oldstable |Pushed to oldoldstable --- Comment #15 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported: Pushed to 19.11.x branch for 19.11.14 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org