]> git.koha-community.org Git - koha.git/commit
Bug 38248: Fix condition when item has no return_claims in API response
authorDavid Cook <dcook@prosentient.com.au>
Wed, 23 Oct 2024 22:35:00 +0000 (22:35 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Thu, 24 Oct 2024 11:38:14 +0000 (13:38 +0200)
commit7ab007718748e07ddb07196cce8c8d49cfd76a2a
tree0a1a5c3820ca5775a9a92471b1fdb277bd9484f2
parent7c9ae2d83bbf6b3c8594e2a363e8eed623b1e1d7
Bug 38248: Fix condition when item has no return_claims in API response

This change just fixes a condition to not break when an item has no return_claims
in an API response.

Test plan:
0) Apply the patch and koha-plack --restart kohadev
NOTE: You may need to rebuild your swagger spec since bug 27919 was pushed
redocly bundle --ext json api/v1/swagger/swagger.yaml \
  --output api/v1/swagger/swagger_bundle.json
1) Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
2) Create an item with a status of "Lost"
3) Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
4) Note that the item table loads without a problem

5) In system preferences, set the ClaimReturnedLostValue syspref to any value
6) Checkout an item to a patron
7) Click "Claim returned" and make the claim
8) Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
9) Note that the item table loads without a problem and "(Claimed returned") appears
for the item that was claimed returned

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc