Bug 12467 - Lost items marked as not on loan even if they are!
authorKyle M Hall <kyle@bywatersolutions.com>
Mon, 23 Jun 2014 16:21:16 +0000 (12:21 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 8 Sep 2014 14:34:01 +0000 (11:34 -0300)
commitb0e5e2c7494e43662867d4049c1c8ecb1afecc80
treec5d87a4ea046b398534b66f1966ad19d9cbc3a03
parente86371a0aa3c024d3a60af71ab055c9415efb844
Bug 12467 - Lost items marked as not on loan even if they are!

The cronjob longoverdue.pl does not require that an item marked as lost
be returned automatically, but there is a line in ModItem that
automatically marks the item's onloan as false if itemlost is set!

Test Plan:
1) Mark an item as lost with longoverdue.pl, without --mark-returned
2) Inspect the db, note that items.onloan is now 0
3) Apply this patch
4) Mark repeat step 1
5) Inspect the db, noe that items.onloan is still 1
6) Test marking an item as lost from staff interface,
   ensure there are no regressions.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch works according to test plan and fixes a data loss bug.

Some notes:
- This patch would be nicer with a regression test.
- Also checked that returning the item removes lost status and onloan still.
- Tried to test with --mark-returned, but couldn't get it to
  return my item neither with nor without the patch. (see comment on
  bug report)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Circulation.pm
C4/Items.pm