Bugzilla – Attachment 127244 Details for
Bug 24850
Koha::DateUtils ignores offsets in RFC3339 datetimes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24850: Correctly handle suspended_until for PUT
Bug-24850-Correctly-handle-suspendeduntil-for-PUT.patch (text/plain), 1.67 KB, created by
Martin Renvoize (ashimema)
on 2021-11-03 11:39:11 UTC
(
hide
)
Description:
Bug 24850: Correctly handle suspended_until for PUT
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-11-03 11:39:11 UTC
Size:
1.67 KB
patch
obsolete
>From eaad4ae0ecb41fdcb2f6e38f7d27cf0388ad2843 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 3 Nov 2021 12:05:42 +0100 >Subject: [PATCH] Bug 24850: Correctly handle suspended_until for PUT > >if we are passing suspended_until to the body, it should be a rfc3339 (what the spec is expecting) >but $hold->suspend_until will be iso > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/REST/V1/Holds.pm | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/Koha/REST/V1/Holds.pm b/Koha/REST/V1/Holds.pm >index 256cb40259..0ca60b1459 100644 >--- a/Koha/REST/V1/Holds.pm >+++ b/Koha/REST/V1/Holds.pm >@@ -280,14 +280,17 @@ sub edit { > $pickup_library_id //= $hold->branchcode; > my $priority = $body->{priority} // $hold->priority; > # suspended_until can also be set to undef >- my $suspended_until = exists $body->{suspended_until} ? $body->{suspended_until} : $hold->suspend_until; >+ my $suspended_until = >+ exists $body->{suspended_until} >+ ? dt_from_string( $body->{suspended_until}, 'rfc3339' ) >+ : dt_from_string( $hold->suspend_until, 'iso' ); > > my $params = { > reserve_id => $hold_id, > branchcode => $pickup_library_id, > rank => $priority, > suspend_until => $suspended_until >- ? output_pref({ dt => dt_from_string($suspended_until, 'iso'), dateformat => 'iso', dateonly => 1 }) >+ ? output_pref({ dt => $suspended_until, dateformat => 'iso', dateonly => 1 }) > : '', > itemnumber => $hold->itemnumber > }; >-- >2.20.1
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 24850
:
100585
|
100586
|
100587
|
100592
|
100593
|
100594
|
100595
|
100678
|
100679
|
100680
|
100681
|
100881
|
100901
|
100902
|
100903
|
100904
|
100905
|
101803
|
101804
|
101805
|
101806
|
101807
|
101808
|
101837
|
101838
|
101839
|
101840
|
101841
|
101842
|
101843
|
101844
|
115851
|
115852
|
115853
|
115854
|
115855
|
115856
|
115857
|
116299
|
116300
|
116301
|
116302
|
116303
|
116304
|
116305
|
116355
|
116356
|
116357
|
116358
|
116359
|
116360
|
116361
|
116511
|
126182
|
126183
|
126184
|
126185
|
126186
|
126187
|
126188
|
126189
|
127231
|
127232
|
127235
|
127236
|
127239
|
127240
|
127241
|
127242
|
127243
| 127244