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

(-)a/Koha/REST/V1/Holds.pm (-3 / +5 lines)
Lines 280-293 sub edit { Link Here
280
        $pickup_library_id //= $hold->branchcode;
280
        $pickup_library_id //= $hold->branchcode;
281
        my $priority         = $body->{priority} // $hold->priority;
281
        my $priority         = $body->{priority} // $hold->priority;
282
        # suspended_until can also be set to undef
282
        # suspended_until can also be set to undef
283
        my $suspended_until   = exists $body->{suspended_until} ? $body->{suspended_until} : $hold->suspend_until;
283
        my $suspended_until =
284
          exists $body->{suspended_until}
285
          ? dt_from_string( $body->{suspended_until}, 'rfc3339' )
286
          : dt_from_string( $hold->suspend_until,     'iso' );
284
287
285
        my $params = {
288
        my $params = {
286
            reserve_id    => $hold_id,
289
            reserve_id    => $hold_id,
287
            branchcode    => $pickup_library_id,
290
            branchcode    => $pickup_library_id,
288
            rank          => $priority,
291
            rank          => $priority,
289
            suspend_until => $suspended_until
292
            suspend_until => $suspended_until
290
              ? output_pref({ dt => dt_from_string($suspended_until, 'iso'), dateformat => 'iso', dateonly => 1 })
293
              ? output_pref({ dt => $suspended_until, dateformat => 'iso', dateonly => 1 })
291
              : '',
294
              : '',
292
            itemnumber    => $hold->itemnumber
295
            itemnumber    => $hold->itemnumber
293
        };
296
        };
294
- 

Return to bug 24850