View | Details | Raw Unified | Return to bug 28586
Collapse All | Expand All

(-)a/Koha/REST/V1/ReturnClaims.pm (+1 lines)
Lines 171-176 sub resolve_claim { Link Here
171
                resolution  => $resolution,
171
                resolution  => $resolution,
172
                resolved_by => $resolved_by,
172
                resolved_by => $resolved_by,
173
                resolved_on => \'NOW()',
173
                resolved_on => \'NOW()',
174
                updated_by  => $resolved_by,
174
            }
175
            }
175
        )->store;
176
        )->store;
176
        $claim->discard_changes;
177
        $claim->discard_changes;
(-)a/t/db_dependent/api/v1/return_claims.t (-3 / +8 lines)
Lines 175-181 subtest 'update_notes() tests' => sub { Link Here
175
175
176
subtest 'resolve_claim() tests' => sub {
176
subtest 'resolve_claim() tests' => sub {
177
177
178
    plan tests => 8;
178
    plan tests => 9;
179
179
180
    $schema->storage->txn_begin;
180
    $schema->storage->txn_begin;
181
181
Lines 204-210 subtest 'resolve_claim() tests' => sub { Link Here
204
204
205
    my $claim_id = $claim->id;
205
    my $claim_id = $claim->id;
206
206
207
    $claim->created_by(undef)->store; # resolve the claim must work even if the created_by patron has been removed
207
    $claim->set(
208
        {
209
            created_by => undef,
210
            updated_by => undef,
211
        }
212
    )->store; # resolve the claim must work even if the created_by patron has been removed
208
213
209
    # Resolve a claim
214
    # Resolve a claim
210
    $t->put_ok(
215
    $t->put_ok(
Lines 217-222 subtest 'resolve_claim() tests' => sub { Link Here
217
    $claim->discard_changes;
222
    $claim->discard_changes;
218
    is( $claim->resolution, "FOUNDINLIB" );
223
    is( $claim->resolution, "FOUNDINLIB" );
219
    is( $claim->resolved_by, $librarian->id );
224
    is( $claim->resolved_by, $librarian->id );
225
    is( $claim->updated_by, $librarian->id );
220
    ok( $claim->resolved_on );
226
    ok( $claim->resolved_on );
221
227
222
    # Make sure the claim doesn't exist on the DB anymore
228
    # Make sure the claim doesn't exist on the DB anymore
223
- 

Return to bug 28586