Bugzilla – Attachment 129621 Details for
Bug 29906
When changing hold parameters over API (PUT) it forcibly gets to "suspended" state
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29906: fix the forcibly gets to "suspended" state problem
Bug-29906-fix-the-forcibly-gets-to-suspended-state.patch (text/plain), 1.10 KB, created by
Peter Vashchuk
on 2022-01-19 16:22:55 UTC
(
hide
)
Description:
Bug 29906: fix the forcibly gets to "suspended" state problem
Filename:
MIME Type:
Creator:
Peter Vashchuk
Created:
2022-01-19 16:22:55 UTC
Size:
1.10 KB
patch
obsolete
>From 6138fb73cb080104c7c1a8d6eed4542c5e4641c7 Mon Sep 17 00:00:00 2001 >From: Petro Vashchuk <stalkernoid@gmail.com> >Date: Wed, 19 Jan 2022 18:01:15 +0200 >Subject: [PATCH] Bug 29906: fix the forcibly gets to "suspended" state problem > >which passes "perl false" to $suspended_until as it is, >but in case of "perl truth" it calls dt_from_string. >--- > Koha/REST/V1/Holds.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/REST/V1/Holds.pm b/Koha/REST/V1/Holds.pm >index 0ca60b1459..8bde3d1531 100644 >--- a/Koha/REST/V1/Holds.pm >+++ b/Koha/REST/V1/Holds.pm >@@ -282,8 +282,8 @@ sub edit { > # suspended_until can also be set to undef > my $suspended_until = > exists $body->{suspended_until} >- ? dt_from_string( $body->{suspended_until}, 'rfc3339' ) >- : dt_from_string( $hold->suspend_until, 'iso' ); >+ ? $body->{suspended_until} && dt_from_string( $body->{suspended_until}, 'rfc3339' ) >+ : $hold->suspend_unti l && dt_from_string( $hold->suspend_until, 'iso' ); > > my $params = { > reserve_id => $hold_id, >-- >2.28.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29906
:
129619
|
129621
|
129622
|
129626
|
129645
|
129650
|
129651
|
129663
|
129666
|
129898
|
129899