Koha-clms/t/db_dependent/api/v1
Jonathan Druart 29d4cfbdb8 Bug 27004: Prevent claim resolution to fail
If the account of the patron who created a claim is removed, then the
claim won't be resolvable.
Trying to resolve the claim will result in a 500:
[2020/12/21 10:05:55] [ERROR] PUT /api/v1/return_claims/1/resolve: unhandled exception (Koha::Exceptions::Checkouts::ReturnClaims::NoCreatedBy)<<[created_by is mandatory]>> Koha::REST::Plugin::Exceptions::__ANON

We should not check if created_by exist when we update an existing hold,
only when we create it.

Test plan:
- Login with patron A
- set a value to syspref ClaimReturnedLostValue
- Check an item out
- Claim returned it
- Login with patron B
- Delete patron A
- Resolve the claim
- ERROR in api-error.log an UI never confirming the resolution
- apply patch & restart services
- Resolve the claim
- it works

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 92dbe80902)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8e3f33e5d6)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit a5c20fc188)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2021-01-15 02:02:38 +01:00
..
acquisitions_funds.t Bug 23843: Make funds endpoint tests more robust 2019-10-23 18:02:47 +01:00
acquisitions_vendors.t Bug 23858: (follow-up) Return code fix 2019-10-28 12:36:46 +00:00
auth.t Bug 25327: Regression tests 2020-06-22 14:25:10 +12:00
auth_authenticate_api_request.t Bug 24003: Regression tests 2020-06-22 11:54:19 +12:00
auth_basic.t Bug 24003: Regression tests 2020-06-22 11:54:19 +12:00
biblios.t Bug 24909: Unit tests 2020-06-15 10:28:07 +12:00
checkouts.t Bug 24543: Fix wrong test in api/v1/checkouts.t 2020-02-10 23:26:00 +00:00
cities.t Bug 23859: Update tests to new style 2019-11-01 08:48:18 +00:00
clubs_holds.t Bug 19618: Add tests 2019-10-01 08:05:58 +01:00
holds.t [SIGNED-OFF] Bug 22522: [19.11.x] Fix several REST API tests 2020-06-09 21:52:37 +00:00
illrequests.t Bug 18589: (follow-up) Add borrowernumber test 2019-03-22 20:21:49 +00:00
items.t Bug 24229: Avoid fetching ALL items in test 2020-06-12 00:26:11 +00:00
libraries.t Bug 25570: (follow-up) Fix tests 2020-07-13 10:47:02 +12:00
oauth.t Bug 25623: Make sure oauth.t rolls back the db 2020-06-22 15:45:34 +12:00
patrons.t Bug 23634: (QA follow-up) Adjust tests 2020-08-25 15:36:30 +12:00
patrons_accounts.t Bug 26271: Add failing test to reveal issue with patrons API endpoint 2020-09-15 23:42:16 +12:00
patrons_password.t [SIGNED-OFF] Bug 22522: [19.11.x] Fix several REST API tests 2020-06-09 21:52:37 +00:00
return_claims.t Bug 27004: Prevent claim resolution to fail 2021-01-15 02:02:38 +01:00
stockrotationstage.t Bug 11897: Use 'stockrotation' permission for the endpoint 2018-10-09 15:46:06 +00:00