https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17944
--- Comment #44 from Alex Buckley <alexbuck...@catalyst.net.nz> --- Hi Jonathan I have implemented the changes you suggested in a single patch for bug 17944. Because I have implemented the following return line (which you suggested) from can_be_deleted() subroutine: return $nb_items + $nb_biblioitems == 0; I had to slightly change the unit test from how you suggested it, this is because whenever there were items and/or biblioitems with the itemtype it meant that ' ' was returned. So the unit test callers are now: is( $item_type->can_be_deleted, '', 'An item type that is used by an item cannot be deleted' ); is ( $item_type->can_be_deleted, '', 'An item type that is used by a biblioitem cannot be deleted' ); Additionally as '' is returned if the itemtype is in use, rather than the number of items and biblioitems using the itemtype I have changed itemtypes.tt to saying: Cannot delete this item type. This record is in use. Deletion is not possible. If you would still like the number of items and biblioitems using the itemtype to be displayed to the user in itemtypes.tt then I will need to change the return for can_be_deleted to a longer if else statement. Could you please have a look at this patch? -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/