Koha-clms/t/db_dependent/api/v1
Petro Vashchuk 092721c3d1 Bug 29906: fix when hold record forcibly gets unwanted "suspended" state
This code allows for "Perl false" to pass through to $suspended_until
if it is in $hold->suspend_until and in $body->{suspended_until}
But in case of "Perl truth" it calls dt_from_string for that value.

Reproduction:
1. run provided test in kshell: prove t/db_dependent/api/v1/holds.t
2. see the test fails with something like:
    #   Failed test 'Location change shouldn't touch suspended status'
    #   at t/db_dependent/api/v1/holds.t line 1067.
    #          got: '1'
    #     expected: '0'

    #   Failed test 'suspended_until should be undef'
    #   at t/db_dependent/api/v1/holds.t line 1068.
    #          got: '2022-01-20 00:00:00'
    #     expected: undef
    # Looks like you failed 2 tests of 39.
3. apply the changes in this patch to Koha/REST/V1/Holds.pm
4. run provided test in kshell: prove t/db_dependent/api/v1/holds.t
5. test will pass.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-01-31 21:55:40 -10:00
..
acquisitions_funds.t
…
acquisitions_orders.t Bug 29464: Regression tests 2022-01-18 21:15:04 -10:00
acquisitions_vendors.t
…
advanced_editor_macros.t
…
article_requests.t Bug 27947: (QA follow-up) Clarify permissions 2021-10-06 10:09:25 +02:00
auth.t Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
auth_authenticate_api_request.t Bug 28948: Make is_public stashed on public routes 2021-10-28 17:32:34 +02:00
auth_basic.t
…
biblios.t Bug 29290: Unit tests 2021-10-28 17:32:34 +02:00
cashups.t
…
checkouts.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
cities.t
…
clubs_holds.t
…
holds.t Bug 29906: fix when hold record forcibly gets unwanted "suspended" state 2022-01-31 21:55:40 -10:00
illrequests.t
…
import_batch_profiles.t Bug 28272: Fix many things... 2021-05-11 09:04:13 +02:00
items.t Bug 27931: Unit tests 2021-06-14 17:35:19 +02:00
libraries.t
…
oauth.t Bug 28722: Regression tests 2021-09-30 09:19:05 +02:00
patrons.t Bug 29403: Fix api/v1/patrons.t 2022-01-28 11:09:06 -10:00
patrons_accounts.t Bug 22435: Update unit tests 2021-08-04 14:06:43 +02:00
patrons_extended_attributes.t Bug 23666: (follow-up) Adjust to new exceptions 2021-04-22 14:50:12 +02:00
patrons_holds.t
…
patrons_password.t Bug 29272: (QA follow-up) Category setup overrides syspref 2021-10-28 12:16:37 +02:00
return_claims.t Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
smtp_servers.t
…
stockrotationstage.t
…
suggestions.t Bug 17314: Unit tests 2021-10-28 17:32:34 +02:00
transfer_limits.t
…
unhandled_exceptions.t Bug 28020: Unit tests 2022-01-05 13:33:46 -10:00