Koha-clms/t/db_dependent/api/v1
Jonathan Druart a5c20fc188 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>
2021-01-05 17:49:38 +00:00
..
acquisitions_funds.t Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
acquisitions_orders.t Bug 25638: Make the tests pass - ignoring the actual issue 2020-06-16 21:48:51 +00:00
acquisitions_vendors.t Bug 25048: Regression tests 2020-04-29 16:24:37 +01:00
advanced_editor_macros.t Bug 25502: Adapt Advanced macros routes to current guidelines 2020-05-19 15:21:16 +01:00
auth.t Bug 25327: Regression tests 2020-05-11 10:02:29 +01:00
auth_authenticate_api_request.t Bug 24003: Regression tests 2020-06-17 21:32:15 +00:00
auth_basic.t Bug 24003: Regression tests 2020-06-17 21:32:15 +00:00
biblios.t Bug 24908: Unit tests 2020-04-29 17:13:30 +01:00
checkouts.t Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
cities.t Bug 25048: Regression tests 2020-04-29 16:24:37 +01:00
clubs_holds.t Bug 23820: Add test for new behaviour 2020-07-27 16:40:23 +00:00
holds.t Bug 27117: Only place_holds permission is needed to adjust pickup locations 2020-12-28 15:25:04 +00:00
illrequests.t Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
items.t Bug 24229: Avoid fetching ALL items in test 2020-05-22 09:33:18 +01:00
libraries.t Bug 25570: (follow-up) Fix tests 2020-07-10 15:43:34 +00:00
oauth.t Bug 25623: Make sure oauth.t rolls back the db 2020-06-17 22:55:22 +00:00
patrons.t Bug 14708: (QA follow-up) Add tests 2020-12-09 21:39:45 +00:00
patrons_accounts.t Bug 26271: Add failing test to reveal issue with patrons API endpoint 2020-09-14 21:35:17 +00:00
patrons_password.t Bug 22522: Fix several REST API tests 2020-02-25 13:44:22 +00:00
return_claims.t Bug 27004: Prevent claim resolution to fail 2021-01-05 17:49:38 +00:00
stockrotationstage.t Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00