Bug 15497: Limit itemtypes by branch in additem.pl
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 12 Sep 2019 15:27:00 +0000 (16:27 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 12 Sep 2019 15:31:06 +0000 (16:31 +0100)
commit3fca44b65dfb4bc03b17df41101db52ddb52da39
tree160bce2954bf6f62906871a0aad4dcb8169017c9
parentff85c6812e58869f804316ef3121988be5332718
Bug 15497: Limit itemtypes by branch in additem.pl

This patch adds a select multiple when you add/edit an itemtype, creates functions to return itemtypes by library, and filters the options of itemtype select in additem

To test:
1) Apply this patch set
2) perl installer/data/mysql/updatedatabase.pl
3) In koha administration => item types, edit "Books" itemtype
CHECK => there is now a select multiple whith libraries at the bottom
4) select centerville and save
5) set centerville as current libary
6) search for any biblio in the catalog
7) click on "edit items"
CHECK => book item type is present
8) set any other libary as current library
SUCCESS => book item type is not present
9) Sign off

Sponsored-by: Northeast Kansas Library System
Sponsored-by: Southeast Kansas Library System
Sponsored-by: Central Kansas Library System
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/ItemType.pm
Koha/ItemTypes.pm
admin/itemtypes.pl
cataloguing/additem.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt