https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34101
Martin Renvoize <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152799|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <[email protected]> --- Created attachment 152925 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152925&action=edit Bug 34101: Limit items types that can be checked out via SIP2 This bug adds the ability to define a list of item types that are blocked from being issued at that SIP account To test: 1) Apply this patch 2) Visit Administration->Item types and select edit on the music item type 3) Make the rental charge 0 and save changes (this allows for the item to be checked out via SIP) 4) In the terminal, vim /etc/koha/sites/kohadev/SIPconfig.xml 5) Edit the term1 account and add the following *inside* the login section: blocked_item_types="BK|MU" You should have something similar to this: <login id ="term1" ........... checked_in_ok="1" blocked_item_types="BK|MU" /> 6) Restart SIP (sudo koha-sip --restart <instancename>) 7) Run a checkout query for an item with the item type book. Here is an example you could use: perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --patron 23529001000463 --item 39999000011418-m checkout 8) Notice the checkout failed and you are given the screen msg "Item type cannot be checked out at this checkout location" 9) Run a checkout query for an item with the item type music. Here is an example you could use: perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --patron 23529001000463 --item 39999000008715 -m checkout 10) Notice the checkout failed and you are given the screen msg "Item type cannot be checked out at this checkout location" 11) vim /etc/koha/sites/kohadev/SIPconfig.xml and delete the BK from the blocked_item 12) Delete the BK from blocked_item_types. It should now look like : blocked_item_types="MU" 13) Restart SIP (sudo koha-sip --restart <instancename>) 14) Run a checkout query for the item with the item type book perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --patron 23529001000463 --item 39999000011418 -m checkout 15) Checkout succesful 16) Run a checkout query for the item with the item type music perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --patron 23529001000463 --item 39999000008715 -m checkout 17) Still fails (because it is blocked) 18) prove t/db_dependent/SIP/Message.t 19) Congratulate yourself for making it through the long test and sign-off :) Signed-off-by: Nick Clemens <[email protected]> Signed-off-by: Martin Renvoize <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://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/
