[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
Mon Dec 21 19:00:59 CET 2020


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

Victor Grousset/tuxayo <victor at tuxayo.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #114547|0                           |1
        is obsolete|                            |

--- Comment #8 from Victor Grousset/tuxayo <victor at 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 at tuxayo.net>

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


More information about the Koha-bugs mailing list