[Koha-bugs] [Bug 26648] Prevent internal server error if item attached to old checkout has been removed

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Oct 5 11:47:02 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26648

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #111804|0                           |1
        is obsolete|                            |

--- Comment #11 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 141333
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141333&action=edit
Bug 26648: Prevent explosion in notices on missing item

The item accessor in Koha::Old::Checkouts could explode given a checkout
where the item had been deleted.

To test
1/ Edit the issueslip notice to output some item details from the
borrowers old checkouts

[% FOREACH old_checkout IN borrower.old_checkouts %]
  [% IF old_checkout.item %]
    [% old_checkout.item.price %]
  [% END %]
[% END %]

2/ Delete the item associated with an old checkout for a test patron
3/ Print the issueslip for the patron
4/ Note a server side error is triggered
5/ Apply the patch
6/ Print the slip again and note the price details for old checkouts are
now displayed
7/ Signoff

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose at inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list