[Koha-bugs] [Bug 27004] 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.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Dec 29 18:42:28 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27004

--- Comment #11 from Tomás Cohen Arazi <tomascohen at 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 at tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list