[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
Sun Jan 22 03:14:58 CET 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17944

Alex Buckley <alexbuckley at catalyst.net.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |Needs Signoff

--- Comment #3 from Alex Buckley <alexbuckley at catalyst.net.nz> ---
Test plan:
1. View the admin/itemtypes.pl script and confirm that sql code is written in
this file

2. Apply this patch

3. View admin/itemtypes.pl script notice the sql code has been removed and
replaced with the perl module call (on line 142):
 my $total = Koha::ItemTypes->check_items_and_biblioitems($itemtype_code);


4. View Koha/ItemTypes.pm and observe the subroutine
check_items_and_biblioitems
(This subroutine contains the sql code that was in itemtypes.pl)

5. Now to check that the deletion of an item type still works with the sql code
moved out of the itemtypes.pl script, log into the Koha staff interface

6. Visit Administration->Item type. Select the 'Delete' button next to an item
type

7. Select the 'Yes, delete this item type' button

8. Observe the message informing you the item type has been deleted. Thus the
patch works as intended. 

Note: as I understand it placing the sql code into a perl module in the Koha
directory is acceptable, because sql code exists in the perl modules in the C4
directory. Please advise me if this isn't the case and I will move this code
again.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list