Bug 32037: Check for existence of object before building link
authorNick Clemens <nick@bywatersolutions.com>
Fri, 28 Oct 2022 14:43:10 +0000 (14:43 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Wed, 18 Jan 2023 21:14:52 +0000 (21:14 +0000)
commit21d01baebcdacfb16c1fbd9ee0bb1a05d3c5837b
treeeea5c75845563419a3498a520c59420dfa483237
parent7fe444dae327ad2c7a025e76dc32628fe3af6fdf
Bug 32037: Check for existence of object before building link

This patch adds a check on the existence of the object and passes this to the template

I also drop a level of IF by moving to ELSIF

To test:
 1 - Enable ReturnLog amd IssueLog
 2 - Checkout an item to a patron
 3 - Return it
 4 - View 'Modification log' tab of the borrwer
 5 - Note item links, test them, they work
 6 - Delete the item
 7 - Reload and try links again, they do not work
 8 - Apply patch
 9 - Reload, no more links
10 - Checkout and return another item
11 - This one has links, and they work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 03c8725b4e253faf87ca3aeda71ce8b59d4efdb0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
tools/viewlog.pl