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)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Sun, 14 Mar 2021 18:43:56 +0000 (18:43 +0000)
commite22376c7e9c19bfe7990213ec1e24c9d358f635b
tree4f6ad58796b79800710b3283ef00bec8dad1d8cd
parentf9d204bd184f843496f1895dc0600370a81e1d08
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>
(cherry picked from commit 26b57ad5d20e385ff922cc8737afebfece17a3cf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 52babece97c9376b2bc7258a88c753e8f28f33ab)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
C4/Circulation.pm