[Koha-bugs] [Bug 17944] Remove the sql code from itemtypes.pl administrative perl script
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri May 5 15:51:15 CEST 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17944
--- Comment #45 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Alex, great! The patch is much better :)
Indeed the return value of can_be_deleted should be 1 or 0. You can achieve
that with:
return $nb_items + $nb_biblioitems == 0 ? 1 : 0;
You will avoid the empty string return value.
In the tests:
The last test says 'An item type that is used by a biblioitem cannot be
deleted'. But actually you are testing that "an item that is used by AN item
AND A biblioitem cannot be deleted'.
You should delete the item to make it test what you want to test.
Finally you will need to update the admin script.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list