Bug 22540 - Add ability to place holds using SIP CLI emulator
Summary: Add ability to place holds using SIP CLI emulator
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Nick Clemens
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-19 15:25 UTC by Kyle M Hall
Modified: 2020-06-04 20:35 UTC (History)
3 users (show)

See Also:
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 (4.13 KB, patch)
2019-03-19 15:26 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22540 - Add ability to place holds using SIP CLI emulator (3.97 KB, patch)
2019-03-19 15:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22540 - Add ability to place holds using SIP CLI emulator (4.03 KB, patch)
2019-03-19 15:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22540: (QA Follow-up) borrowernumber is not an accessor for C4::SIP::ILS::Patron, access is via hashref (947 bytes, patch)
2019-03-20 17:25 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22540: (QA Follow-up) Add ability to specify the pickup location using a command line parameter (2.12 KB, patch)
2019-03-20 17:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22540: Add ability to place holds using SIP CLI emulator (4.12 KB, patch)
2019-03-20 17:46 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22540: (QA follow-up) fixes (2.86 KB, patch)
2019-03-20 17:46 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22540: Add ability to place holds using SIP CLI emulator (4.17 KB, patch)
2019-07-26 19:19 UTC, Frédérik Chénier
Details | Diff | Splinter Review
Bug 22540: (QA follow-up) fixes (2.92 KB, patch)
2019-07-26 19:19 UTC, Frédérik Chénier
Details | Diff | Splinter Review
Bug 22540: Add ability to place holds using SIP CLI emulator (4.23 KB, patch)
2019-10-04 09:43 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 22540: (QA follow-up) fixes (2.98 KB, patch)
2019-10-04 09:43 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 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 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