Bug 22540

Summary: Add ability to place holds using SIP CLI emulator
Product: Koha Reporter: Kyle M Hall <kyle>
Component: SIP2Assignee: Kyle M Hall <kyle>
Status: CLOSED FIXED QA Contact: Nick Clemens (kidclamp) <nick>
Severity: enhancement    
Priority: P5 - low CC: colin.campbell, katrin.fischer, wizzyrea
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00
Attachments: Bug 22540 - Add ability to place holds using SIP CLI emulator
Bug 22540 - Add ability to place holds using SIP CLI emulator
Bug 22540 - Add ability to place holds using SIP CLI emulator
Bug 22540: (QA Follow-up) borrowernumber is not an accessor for C4::SIP::ILS::Patron, access is via hashref
Bug 22540: (QA Follow-up) Add ability to specify the pickup location using a command line parameter
Bug 22540: Add ability to place holds using SIP CLI emulator
Bug 22540: (QA follow-up) fixes
Bug 22540: Add ability to place holds using SIP CLI emulator
Bug 22540: (QA follow-up) fixes
Bug 22540: Add ability to place holds using SIP CLI emulator
Bug 22540: (QA follow-up) fixes

Description Kyle M Hall 2019-03-19 15:25:36 UTC

    
Comment 1 Kyle M Hall 2019-03-19 15:26:14 UTC
Created attachment 86748 [details] [review]
Bug 22540 - Add ability to place holds using SIP CLI emulator

Test Plan:
1) Place a hold using the following arguments:
   sip_cli_emulator.pl -a <address> -p <port> -su <sip_user> -sp <sip_password> -l <location_code> --patron <cardnumber> --item <barcode> -m hold
2) Note the hold was placed in Koha
Comment 2 Kyle M Hall 2019-03-19 15:28:26 UTC
Created attachment 86750 [details] [review]
Bug 22540 - Add ability to place holds using SIP CLI emulator

Test Plan:
1) Place a hold using the following arguments:
   sip_cli_emulator.pl -a <address> -p <port> -su <sip_user> -sp <sip_password> -l <location_code> --patron <cardnumber> --item <barcode> -m hold
2) Note the hold was placed in Koha
Comment 3 Kyle M Hall 2019-03-19 15:29:55 UTC
Created attachment 86751 [details] [review]
Bug 22540 - Add ability to place holds using SIP CLI emulator

Test Plan:
1) Place a hold using the following arguments:
   sip_cli_emulator.pl -a <address> -p <port> -su <sip_user> -sp <sip_password> -l <location_code> --patron <cardnumber> --item <barcode> -m hold
2) Note the hold was placed in Koha
Comment 4 Liz Rea 2019-03-20 16:50:02 UTC
The vars that didn't get declared aside (I fixed those ones) - this seems to create a string that the sip server sees as a disconnect, so doesn't quite work.

It'll be really really good to have this in the emulator though.

Cheers,
Liz
Comment 5 Liz Rea 2019-03-20 16:52:06 UTC
kohadev-koha@kohadevbox:/home/vagrant/kohaclone/misc$ perl sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su=kohasip -sp=Koha1 -l LIB --item=TEST1111 --patron=23529000139858 -m hold
Attempting socket connection to 127.0.0.1:6001...connected!
SEND: 9300CNkohasip|COKoha1|CPLIB|
READ: 941

Trying 'hold'
SEND: 15+20190320    165132AOLIB|AA23529000139858|ABTEST1111|ACKoha1|BON|
Use of uninitialized value $data in concatenation (.) or string at sip_cli_emulator.pl line 342, <GEN0> chunk 1.
READ: 


Here is the result :)
Comment 6 Kyle M Hall 2019-03-20 17:02:05 UTC
./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su koha -sp koha -l LIB --item TEST1111 --patron 23529000139858 -m hold
Attempting socket connection to 127.0.0.1:6001...connected!
SEND: 9300CNkoha|COkoha|CPLIB|
READ: 941

Trying 'hold'
SEND: 15+20190320    165942AOLIB|AA23529000139858|ABTEST1111|ACkoha|BON|
READ: 160N20190320    165944AA23529000139858|AOkohalibrary|AFNo such item.|

Works when the item is missing ;) I'll dig deeper.
Comment 7 Kyle M Hall 2019-03-20 17:25:18 UTC
Created attachment 86825 [details] [review]
Bug 22540: (QA Follow-up) borrowernumber is not an accessor for C4::SIP::ILS::Patron, access is via hashref
Comment 8 Kyle M Hall 2019-03-20 17:32:24 UTC
Created attachment 86826 [details] [review]
Bug 22540: (QA Follow-up) Add ability to specify the pickup location using a command line parameter
Comment 9 Liz Rea 2019-03-20 17:46:09 UTC
Created attachment 86827 [details] [review]
Bug 22540: Add ability to place holds using SIP CLI emulator

Test Plan:
1) Place a hold using the following arguments:
   sip_cli_emulator.pl -a <address> -p <port> -su <sip_user> -sp <sip_password> -l <location_code> --patron <cardnumber> --item <barcode> --pickup-location <location_code> -m hold
2) Note the hold was placed in Koha

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

https://bugs.koha-community.org/show_bug.cgi?id=22330
Comment 10 Liz Rea 2019-03-20 17:46:12 UTC
Created attachment 86828 [details] [review]
Bug 22540: (QA follow-up) fixes

borrowernumber is not an accessor for C4::SIP::ILS::Patron, access is
via hashref

Add ability to specify the pickup location using a command line
parameter

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

https://bugs.koha-community.org/show_bug.cgi?id=22330
Comment 11 Frédérik Chénier 2019-07-26 19:19:37 UTC
Created attachment 91842 [details] [review]
Bug 22540: Add ability to place holds using SIP CLI emulator

Test Plan:
1) Place a hold using the following arguments:
   sip_cli_emulator.pl -a <address> -p <port> -su <sip_user> -sp <sip_password> -l <location_code> --patron <cardnumber> --item <barcode> -m hold
2) Note the hold was placed in Koha

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

https://bugs.koha-community.org/show_bug.cgi?id=22330
Signed-off-by: frederik chenier <frederik.chenier@inlibro.com>
Comment 12 Frédérik Chénier 2019-07-26 19:19:43 UTC
Created attachment 91843 [details] [review]
Bug 22540: (QA follow-up) fixes

borrowernumber is not an accessor for C4::SIP::ILS::Patron, access is
via hashref

Add ability to specify the pickup location using a command line
parameter

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

https://bugs.koha-community.org/show_bug.cgi?id=22330
Signed-off-by: frederik chenier <frederik.chenier@inlibro.com>
Comment 13 Nick Clemens (kidclamp) 2019-10-04 09:43:00 UTC
Created attachment 93725 [details] [review]
Bug 22540: Add ability to place holds using SIP CLI emulator

Test Plan:
1) Place a hold using the following arguments:
   sip_cli_emulator.pl -a <address> -p <port> -su <sip_user> -sp <sip_password> -l <location_code> --patron <cardnumber> --item <barcode> -m hold
2) Note the hold was placed in Koha

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

https://bugs.koha-community.org/show_bug.cgi?id=22330
Signed-off-by: frederik chenier <frederik.chenier@inlibro.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 14 Nick Clemens (kidclamp) 2019-10-04 09:43:05 UTC
Created attachment 93726 [details] [review]
Bug 22540: (QA follow-up) fixes

borrowernumber is not an accessor for C4::SIP::ILS::Patron, access is
via hashref

Add ability to specify the pickup location using a command line
parameter

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

https://bugs.koha-community.org/show_bug.cgi?id=22330
Signed-off-by: frederik chenier <frederik.chenier@inlibro.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 15 Martin Renvoize 2019-10-08 13:31:35 UTC
Nice work!

Pushed to master for 19.11.00