]> git.koha-community.org Git - koha.git/commit
Bug 14651: (regression test) fallback to bib-level if itype is undef
authorTomas Cohen Arazi <tomascohen@unc.edu.ar>
Tue, 18 Aug 2015 19:34:25 +0000 (16:34 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 7 Sep 2015 14:14:19 +0000 (11:14 -0300)
commitefe3d17acc237e00cc7c0e37eba92e8eead57ebf
treedde032eabfcaac40df0ad3efadfd57a049c70d63
parentdb891d33f0bbe75748fd725036066f45c2e762fe
Bug 14651: (regression test) fallback to bib-level if itype is undef

Koha::Item->effective_itemtype should fallback to biblio-level itemtype
even if item-level item types are set, in the case the item has no itemtype
set (bad migration, bad old code).

To test:
- Run
  $ prove t/db_dependent/Items.t
=> FAIL: Koha::Item->effective_itemtype doesn't work properly

Edit: Added a test for a warning when falling back as per QA request
and because it made a lot of sense :-D

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
t/db_dependent/Items.t