Bug 27808: Refresh the item object when AddReturn is called
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 26 Feb 2021 19:55:59 +0000 (16:55 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 1 Mar 2021 14:14:23 +0000 (15:14 +0100)
commit26b57ad5d20e385ff922cc8737afebfece17a3cf
treea1f949076ae28f08241ebfb1460074662867ae6e
parent44a54eb526eff58b860d699ee3c5fb11b3b25fab
Bug 27808: Refresh the item object when AddReturn is called

This patch changes the original implementation so the item object is
refreshed altogether instead of explicitly pinpointing a specific field
we identified an edge case can leave out from ->store. I propose this
alterate implementation because what this bug highlights is the fact we
don't code thinking calls to things can have side-effects (like this
case, with AddReturn updating the onloan status (and maybe other
things?).

To test:
1. Make sure circ tests pass with and without this patch

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Circulation.pm