The action log viewer attempts to build links to items/biblios etc. These links are broken when the item is deleted We are fetching the object to determine link values, so we should simply display the info field when no object is found
Created attachment 142775 [details] [review] 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
Created attachment 142790 [details] [review] 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>
Nick, Nick, Nick... Assignee! :)
Created attachment 143021 [details] [review] 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>
Pushed to master for 22.11. Nice work everyone, thanks!
Backpoted to 22.05.x for upcoming 22.05.09
pushed to 21.11.x for 21.11.16
Not backported to 21.05.x