Bug 24413: Apply AutoRemoveOverduesRestrictions for lost items
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 17 Feb 2020 15:27:57 +0000 (16:27 +0100)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Fri, 12 Jun 2020 19:16:25 +0000 (21:16 +0200)
commite2e43182ca2b100b61532e5c6499abae78331ba2
tree4b7ae36b53d939a648302a09166cc7548c39f59a
parentdf8e0a1205fd23243d8207710c4a001e4ed59c79
Bug 24413: Apply AutoRemoveOverduesRestrictions for lost items

It's quite hard to know where this need to be fixed.
it can be either MarkIssueReturned or LostItem, depending on the
different cases we want to handle.

This patch picked MarkIssueReturned, but maybe the similar code in
AddReturn needs to be removed then.

== Test plan ==
1. Set MarkLostItemsAsReturned to 'from items tab of the catalog module'
2. Set AutoRemoveOverduesRestrictions to 'Do'
3. Set up an overdues restriction in the notice triggers
4. Check out an item and let the overdues process restrict the account
5. Navigate to the moredetail.pl page (items tab) for the overdue item
6. Mark the item lost
7. Return to the account in question - notice the item has been returned, but the restriction remains
8. Clean state: remove restriction + remove item lost status
9. Apply patch
10. Redo the test but this time in addition to the item being returned,
    the restriction will be lifted.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 70ae2eaf9cdc7708f85b1724e5bc89623355b585)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 28664aea0ae023ffd9fb57ff130138662e591b1d)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
C4/Circulation.pm