Bugzilla – Attachment 110137 Details for
Bug 24718
Introduce hour-based holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24718: (follow-up) Attempting to fix Koha REST holds
Bug-24718-follow-up-Attempting-to-fix-Koha-REST-ho.patch (text/plain), 4.85 KB, created by
Aleisha Amohia
on 2020-09-16 01:33:18 UTC
(
hide
)
Description:
Bug 24718: (follow-up) Attempting to fix Koha REST holds
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2020-09-16 01:33:18 UTC
Size:
4.85 KB
patch
obsolete
>From d937d4ab4ffe1eccc5dd284e01269eb1b67a61b1 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 16 Sep 2020 13:32:15 +1200 >Subject: [PATCH] Bug 24718: (follow-up) Attempting to fix Koha REST holds > >--- > Koha/REST/V1/Holds.pm | 1 - > api/v1/swagger/definitions/hold.json | 2 +- > t/db_dependent/api/v1/holds.t | 18 ++++++++---------- > 3 files changed, 9 insertions(+), 12 deletions(-) > >diff --git a/Koha/REST/V1/Holds.pm b/Koha/REST/V1/Holds.pm >index e197f32334..5eddf1c238 100644 >--- a/Koha/REST/V1/Holds.pm >+++ b/Koha/REST/V1/Holds.pm >@@ -314,7 +314,6 @@ sub suspend { > $suspend_end_date = output_pref({ > dt => dt_from_string( $hold->suspend_until ), > dateformat => 'rfc3339', >- dateonly => 1 > } > ); > } >diff --git a/api/v1/swagger/definitions/hold.json b/api/v1/swagger/definitions/hold.json >index 6a018e916f..8f90b7665f 100644 >--- a/api/v1/swagger/definitions/hold.json >+++ b/api/v1/swagger/definitions/hold.json >@@ -11,7 +11,7 @@ > }, > "hold_date": { > "type": ["string", "null"], >- "format": "date", >+ "format": "date-time", > "description": "The date the hold was placed" > }, > "biblio_id": { >diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t >index 750bcd95b4..3b647ed595 100755 >--- a/t/db_dependent/api/v1/holds.t >+++ b/t/db_dependent/api/v1/holds.t >@@ -157,7 +157,7 @@ my $post_data = { > biblio_id => int($biblio_1->biblionumber), > item_id => int($item_1->itemnumber), > pickup_library_id => $branchcode, >- expiration_date => output_pref({ dt => $expiration_date, dateformat => 'rfc3339', dateonly => 1 }), >+ expiration_date => output_pref({ dt => $expiration_date, dateformat => 'rfc3339' }), > priority => 2, > }; > my $put_data = { >@@ -273,7 +273,7 @@ subtest "Test endpoints with permission" => sub { > $t->get_ok( "//$userid_1:$password@/api/v1/holds?patron_id=" . $patron_1->borrowernumber ) > ->status_is(200) > ->json_is('/0/hold_id', $reserve_id) >- ->json_is('/0/expiration_date', output_pref({ dt => $expiration_date, dateformat => 'rfc3339', dateonly => 1 })) >+ ->json_is('/0/expiration_date', output_pref({ dt => $expiration_date, dateformat => 'rfc3339' })) > ->json_is('/0/pickup_library_id', $branchcode); > > $t->post_ok( "//$userid_3:$password@/api/v1/holds" => json => $post_data ) >@@ -342,8 +342,8 @@ subtest 'test AllowHoldDateInFuture' => sub { > biblio_id => int($biblio_1->biblionumber), > item_id => int($item_1->itemnumber), > pickup_library_id => $branchcode, >- expiration_date => output_pref({ dt => $expiration_date, dateformat => 'rfc3339', dateonly => 1 }), >- hold_date => output_pref({ dt => $future_hold_date, dateformat => 'rfc3339', dateonly => 1 }), >+ expiration_date => output_pref({ dt => $expiration_date, dateformat => 'rfc3339' }), >+ hold_date => output_pref({ dt => $future_hold_date, dateformat => 'rfc3339' }), > priority => 2, > }; > >@@ -357,7 +357,7 @@ subtest 'test AllowHoldDateInFuture' => sub { > > $t->post_ok( "//$userid_3:$password@/api/v1/holds" => json => $post_data ) > ->status_is(201) >- ->json_is('/hold_date', output_pref({ dt => $future_hold_date, dateformat => 'rfc3339', dateonly => 1 })); >+ ->json_is('/hold_date', output_pref({ dt => $future_hold_date, dateformat => 'rfc3339' })); > }; > > subtest 'test AllowHoldPolicyOverride' => sub { >@@ -424,8 +424,7 @@ subtest 'suspend and resume tests' => sub { > > my $end_date = output_pref({ > dt => dt_from_string( undef ), >- dateformat => 'rfc3339', >- dateonly => 1 >+ dateformat => 'rfc3339' > }); > > $t->post_ok( "//$userid:$password@/api/v1/holds/" . $hold->id . "/suspension" => json => { end_date => $end_date } ); >@@ -438,7 +437,6 @@ subtest 'suspend and resume tests' => sub { > output_pref({ > dt => dt_from_string( $hold->suspend_until ), > dateformat => 'rfc3339', >- dateonly => 1 > }), > 'Hold suspension has correct end date' > ); >@@ -454,11 +452,11 @@ subtest 'suspend and resume tests' => sub { > . $hold->id > . "/suspension" => json => { > end_date => >- output_pref( { dt => $date, dateformat => 'rfc3339', dateonly => 1 } ) >+ output_pref( { dt => $date, dateformat => 'rfc3339' } ) > } > )->status_is( 201, 'Hold suspension created' ) > ->json_is( '/end_date', >- output_pref( { dt => $date, dateformat => 'rfc3339', dateonly => 1 } ) ) >+ output_pref( { dt => $date, dateformat => 'rfc3339' } ) ) > ->header_is( Location => "/api/v1/holds/" . $hold->id . "/suspension", 'The Location header is set' ); > > $t->delete_ok( "//$userid:$password@/api/v1/holds/" . $hold->id . "/suspension" ) >-- >2.11.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 24718
:
99540
|
99541
|
99542
|
99543
|
99544
|
99545
|
99548
|
103521
|
103522
|
103549
|
103550
|
103551
|
103552
|
103553
|
103554
|
103555
|
106270
|
106271
|
106272
|
106273
|
106274
|
106275
|
110084
|
110085
|
110086
|
110087
|
110088
|
110089
|
110090
|
110091
|
110098
|
110137
|
110161
|
110303
|
126559
|
126560
|
126561
|
126562
|
126563
|
126564
|
148293
|
148294
|
148295
|
148296
|
148297
|
148298
|
162474
|
162475
|
162476
|
162477
|
162478
|
162479