]> git.koha-community.org Git - koha.git/commit
Bug 14598: Make C4::Circulation::AddReturn store the right itemtype
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 27 Jul 2015 14:40:38 +0000 (11:40 -0300)
committerJulian Maurice <julian.maurice@biblibre.com>
Wed, 30 Nov 2016 12:48:05 +0000 (13:48 +0100)
commit7c40950513d80c3064140b187624289c9dbdddca
tree62f362e2a467c828a537ece5a3d262949a65bc31
parent465e1a203fc398a232a4ba79caebb9003e3266af
Bug 14598: Make C4::Circulation::AddReturn store the right itemtype

This patch makes C4::Circulation::AddReturn correctly store the itemtype
on the 'statistics' table.

To reproduce:
- Checkout master.
- Make a checkout.
- Check the 'statistics' table and notice the itemtype is correctly set
  > SELECT * FROM statistics;
- Check the item in.
- Check the 'statistics' table and notice the itemtype is not set
  > SELECT * FROM statistics WHERE type="return";
=> FAIL: itemtype is set to NULL

To test:
- Apply the regression tests patch
- Run the tests:
  $ prove t/db_dependent/Circulation/Returns.t
=> FAIL: Tests fail
- Apply this patch
- Run the regression tests:
  $ prove t/db_dependent/Circulation/Returns.t
=> SUCCESS: Tests now pass.
- Repeat the 'To reproduce' steps
=> SUCCESS: itemtype is now correctly set (in real life)
- Happily sign off :-D

Sponsored-by: Universidad Empresarial Siglo 21
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 285ac7a31eb50262af9c6a51502630ba150b14fa)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
C4/Circulation.pm