@@ -, +, @@ - 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 --- Koha/Checkouts/ReturnClaim.pm | 2 +- t/db_dependent/api/v1/return_claims.t | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) --- a/Koha/Checkouts/ReturnClaim.pm +++ a/Koha/Checkouts/ReturnClaim.pm @@ -48,7 +48,7 @@ exceptions as needed. sub store { my ( $self ) = @_; - unless ( $self->created_by ) { + unless ( $self->in_storage || $self->created_by ) { Koha::Exceptions::Checkouts::ReturnClaims::NoCreatedBy->throw(); } --- a/t/db_dependent/api/v1/return_claims.t +++ a/t/db_dependent/api/v1/return_claims.t @@ -204,6 +204,8 @@ subtest 'resolve_claim() tests' => sub { my $claim_id = $claim->id; + $claim->created_by(undef)->store; # resolve the claim must work even if the created_by patron has been removed + # Resolve a claim $t->put_ok( "//$userid:$password@/api/v1/return_claims/$claim_id/resolve" => json => { --