Description
Kyle M Hall (khall)
2014-10-29 12:56:37 UTC
Created attachment 32901 [details] [review] Bug 13159 - Enhancements to the SIP2 command line emulator I needed to be able to perform checkout operations for testing from the command line. I ended up reengineering the SIP2 command line tester quite a bit. Enhancements: * Moved message generation code to subroutines * Added checkout message support * Added command line switches for each supported message * Enabled use of Sip::Constants to keep code DRY and more understandable * Moved script from misc to C4/SIP * Designed with an eye towards possibly moving some code to CPAN in the future Test Plan: 1) Apply this patch 2) Look at help via ./C4/SIP/sip_cli_emulator.pl --help 3) Test patron status request and patron information, should work as before except you need to pass the command line switches to enable them 4) Test the new checkout option --checkout <item barcode> Created attachment 32917 [details] [review] Bug 13159 - Enhancements to the SIP2 command line emulator I needed to be able to perform checkout operations for testing from the command line. I ended up reengineering the SIP2 command line tester quite a bit. Enhancements: * Moved message generation code to subroutines * Added checkout message support * Added command line switches for each supported message * Enabled use of Sip::Constants to keep code DRY and more understandable * Moved script from misc to C4/SIP * Designed with an eye towards possibly moving some code to CPAN in the future Test Plan: 1) Apply this patch 2) Look at help via ./C4/SIP/sip_cli_emulator.pl --help 3) Test patron status request and patron information, should work as before except you need to pass the command line switches to enable them 4) Test the new checkout option --checkout <item barcode> Created attachment 32923 [details] [review] Bug 13159 - Enhancements to the SIP2 command line emulator I needed to be able to perform checkout operations for testing from the command line. I ended up reengineering the SIP2 command line tester quite a bit. Enhancements: * Moved message generation code to subroutines * Added checkout message support * Added command line switches for each supported message * Enabled use of Sip::Constants to keep code DRY and more understandable * Moved script from misc to C4/SIP * Designed with an eye towards possibly moving some code to CPAN in the future * Also designed to make adding new messages much easier in the future Test Plan: 1) Apply this patch 2) Look at help via ./C4/SIP/sip_cli_emulator.pl --help 3) Test patron status request and patron information, should work as before except you need to pass the command line switche -m <message_name> 4) Test the new checkout option using -m checkout -i <item barcode> Created attachment 32924 [details] [review] Bug 13159 - Enhancements to the SIP2 command line emulator I needed to be able to perform checkout operations for testing from the command line. I ended up reengineering the SIP2 command line tester quite a bit. Enhancements: * Moved message generation code to subroutines * Added checkout message support * Added command line switches for each supported message * Enabled use of Sip::Constants to keep code DRY and more understandable * Moved script from misc to C4/SIP * Designed with an eye towards possibly moving some code to CPAN in the future * Also designed to make adding new messages much easier in the future Test Plan: 1) Apply this patch 2) Look at help via ./C4/SIP/sip_cli_emulator.pl --help 3) Test patron status request and patron information, should work as before except you need to pass the command line switche -m <message_name> 4) Test the new checkout option using -m checkout -i <item barcode> Created attachment 32965 [details] [review] Bug 13159 - Enhancements to the SIP2 command line emulator I needed to be able to perform checkout operations for testing from the command line. I ended up reengineering the SIP2 command line tester quite a bit. Enhancements: * Moved message generation code to subroutines * Added checkout message support * Added command line switches for each supported message * Enabled use of Sip::Constants to keep code DRY and more understandable * Moved script from misc to C4/SIP * Designed with an eye towards possibly moving some code to CPAN in the future * Also designed to make adding new messages much easier in the future Test Plan: 1) Apply this patch 2) Look at help via ./C4/SIP/sip_cli_emulator.pl --help 3) Test patron status request and patron information, should work as before except you need to pass the command line switche -m <message_name> 4) Test the new checkout option using -m checkout -i <item barcode> Created attachment 32966 [details] [review] Bug 13159 - Enhancements to the SIP2 command line emulator Created attachment 33648 [details] [review] Bug 13159 - Enhancements to the SIP2 command line emulator I needed to be able to perform checkout operations for testing from the command line. I ended up reengineering the SIP2 command line tester quite a bit. Enhancements: * Moved message generation code to subroutines * Added checkout message support * Added command line switches for each supported message * Enabled use of Sip::Constants to keep code DRY and more understandable * Moved script from misc to C4/SIP * Designed with an eye towards possibly moving some code to CPAN in the future * Also designed to make adding new messages much easier in the future Test Plan: 1) Apply this patch 2) Look at help via ./C4/SIP/sip_cli_emulator.pl --help 3) Test patron status request and patron information, should work as before except you need to pass the command line switche -m <message_name> 4) Test the new checkout option using -m checkout -i <item barcode> Created attachment 33910 [details] [review] Bug 13159 - Enhancements to the SIP2 command line emulator I needed to be able to perform checkout operations for testing from the command line. I ended up reengineering the SIP2 command line tester quite a bit. Enhancements: * Moved message generation code to subroutines * Added checkout message support * Added command line switches for each supported message * Enabled use of Sip::Constants to keep code DRY and more understandable * Moved script from misc to C4/SIP * Designed with an eye towards possibly moving some code to CPAN in the future * Also designed to make adding new messages much easier in the future Test Plan: 1) Apply this patch 2) Look at help via ./C4/SIP/sip_cli_emulator.pl --help 3) Test patron status request and patron information, should work as before except you need to pass the command line switche -m <message_name> 4) Test the new checkout option using -m checkout -i <item barcode> Created attachment 33912 [details] [review] Bug 13159 - Enhancements to the SIP2 command line emulator I needed to be able to perform checkout operations for testing from the command line. I ended up reengineering the SIP2 command line tester quite a bit. Enhancements: * Moved message generation code to subroutines * Added checkout message support * Added command line switches for each supported message * Enabled use of Sip::Constants to keep code DRY and more understandable * Moved script from misc to C4/SIP * Designed with an eye towards possibly moving some code to CPAN in the future * Also designed to make adding new messages much easier in the future Test Plan: 1) Apply this patch 2) Look at help via ./C4/SIP/sip_cli_emulator.pl --help 3) Test patron status request and patron information, should work as before except you need to pass the command line switche -m <message_name> 4) Test the new checkout option using -m checkout -i <item barcode> Created attachment 35039 [details] [review] Bug 13159 - Enhancements to the SIP2 command line emulator I needed to be able to perform checkout operations for testing from the command line. I ended up reengineering the SIP2 command line tester quite a bit. Enhancements: * Moved message generation code to subroutines * Added checkout message support * Added command line switches for each supported message * Enabled use of Sip::Constants to keep code DRY and more understandable * Moved script from misc to C4/SIP * Designed with an eye towards possibly moving some code to CPAN in the future * Also designed to make adding new messages much easier in the future Test Plan: 1) Apply this patch 2) Look at help via ./C4/SIP/sip_cli_emulator.pl --help 3) Test patron status request and patron information, should work as before except you need to pass the command line switche -m <message_name> 4) Test the new checkout option using -m checkout -i <item barcode> Created attachment 35163 [details] [review] Bug 13159 - Enhancements to the SIP2 command line emulator I needed to be able to perform checkout operations for testing from the command line. I ended up reengineering the SIP2 command line tester quite a bit. Enhancements: * Moved message generation code to subroutines * Added checkout message support * Added command line switches for each supported message * Enabled use of Sip::Constants to keep code DRY and more understandable * Moved script from misc to C4/SIP * Designed with an eye towards possibly moving some code to CPAN in the future * Also designed to make adding new messages much easier in the future Test Plan: 1) Apply this patch 2) Look at help via ./C4/SIP/sip_cli_emulator.pl --help 3) Test patron status request and patron information, should work as before except you need to pass the command line switche -m <message_name> 4) Test the new checkout option using -m checkout -i <item barcode> Created attachment 35457 [details] [review] Bug 13159 - Enhancements to the SIP2 command line emulator I needed to be able to perform checkout operations for testing from the command line. I ended up reengineering the SIP2 command line tester quite a bit. Enhancements: * Moved message generation code to subroutines * Added support for more messages * Added command line switches for each supported message * Enabled use of Sip::Constants to keep code DRY and more understandable * Moved script from misc to C4/SIP * Designed with an eye towards possibly moving some code to CPAN in the future * Also designed to make adding new messages much easier in the future Test Plan: 1) Apply this patch 2) Look at help via ./C4/SIP/sip_cli_emulator.pl --help 3) Test patron status request and patron information, should work as before except you need to pass the command line switche -m <message_name> 4) Test the new checkout option using -m checkout -i <item barcode> Created attachment 35666 [details] [review] Bug 13159 - Enhancements to the SIP2 command line emulator I needed to be able to perform checkout operations for testing from the command line. I ended up reengineering the SIP2 command line tester quite a bit. Enhancements: * Moved message generation code to subroutines * Added support for more messages * Added command line switches for each supported message * Enabled use of Sip::Constants to keep code DRY and more understandable * Moved script from misc to C4/SIP * Designed with an eye towards possibly moving some code to CPAN in the future * Also designed to make adding new messages much easier in the future Test Plan: 1) Apply this patch 2) Look at help via ./C4/SIP/sip_cli_emulator.pl --help 3) Test patron status request and patron information, should work as before except you need to pass the command line switche -m <message_name> 4) Test the new checkout option using -m checkout -i <item barcode> Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Worked as advertised, with one warning at renew only: Trying 'renew' Use of uninitialized value $value in concatenation (.) or string at ./sip_cli_emulator.pl line 462, <GEN0> chunk 1. This looks awesome! I am just wondering why you have moved the script to C4/Sip. (In reply to Jonathan Druart from comment #14) > This looks awesome! > I am just wondering why you have moved the script to C4/Sip. Because it uses Sip::MsgType Moving it there means no need to run it with perl -I at the command line. Created attachment 36143 [details] [review] Bug 13159 [QA Followup] - Fix flag parameters Created attachment 36293 [details] [review] Bug 13159 [QA Followup] - Fix changed namespace for Sip::Constants Created attachment 36294 [details] [review] Bug 13159 [QA Followup] - Move script back to it's original path Still works as intended, so leaving this bug as Signed off for QA Testing SIP2 messages, looking into 3M SIP2.0 manual. MEssages are not standards compliant: 63 && 23: - Non-standard compliant, has no zero padded month, day and second. Distorts fixed-length fields. - fields ok 24: - OK 64: - OK No institution ID anywhere?? Will be fixed by 13666. Silly warning: Use of uninitialized value $value in concatenation (.) or string at ./sip_cli_emulator.pl line 462, <GEN0> chunk 1. is ruining my day. Otherwise works as expected. Will proceed to fix and provide a followup. Created attachment 36419 [details] [review] Bug 13159 - Enhancements to the SIP2 command line emulator I needed to be able to perform checkout operations for testing from the command line. I ended up reengineering the SIP2 command line tester quite a bit. Enhancements: * Moved message generation code to subroutines * Added support for more messages * Added command line switches for each supported message * Enabled use of Sip::Constants to keep code DRY and more understandable * Moved script from misc to C4/SIP * Designed with an eye towards possibly moving some code to CPAN in the future * Also designed to make adding new messages much easier in the future Test Plan: 1) Apply this patch 2) Look at help via ./C4/SIP/sip_cli_emulator.pl --help 3) Test patron status request and patron information, should work as before except you need to pass the command line switche -m <message_name> 4) Test the new checkout option using -m checkout -i <item barcode> Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Worked as advertised, with one warning at renew only: Trying 'renew' Use of uninitialized value $value in concatenation (.) or string at ./sip_cli_emulator.pl line 462, <GEN0> chunk 1. Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Created attachment 36420 [details] [review] Bug 13159 [QA Followup] - Fix flag parameters Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Created attachment 36421 [details] [review] Bug 13159 [QA Followup] - Fix changed namespace for Sip::Constants Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Created attachment 36422 [details] [review] Bug 13159 [QA Followup] - Move script back to it's original path Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Created attachment 36423 [details] [review] Bug 13159 [QA Followup] - Fix transaction_date and undefined warning cli-client doesnt respect the transaction_date format "YYYYMMDDZZZZHHMMSS" Using timestamp() to generate the proper datetime format. "String $value undefined"-warning in build_field() fixed. Created attachment 36426 [details] [review] Bug 13159 [QA Followup] - Move script back to it's original path Fixed bug in C4/SIP/ILS.pm line 202 as mentioned above. Tested OK again and setting to Signed Off as it already working before QA. Comment on attachment 36426 [details] [review] Bug 13159 [QA Followup] - Move script back to it's original path patched the wrong bug, silly me! Created attachment 37547 [details] [review] Bug 13159 [QA Followup] - Remove unused call to localtime() NB this is fairly self contained to the emulator should have no effects on other parts of the system - applies cleanly. RM may want to squash these into one patch Patches pushed to master. Thanks Kyle! |