| Summary: | sip_cli_emulator doesn't work and documentation is in error | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Bob Ewart <bob-ewart> |
| Component: | SIP2 | Assignee: | Bugs List <koha-bugs> |
| Status: | NEW --- | QA Contact: | Testopia <testopia> |
| Severity: | minor | ||
| Priority: | P5 - low | CC: | alexander.wagner, blawlor, bob-ewart, martin.renvoize, nick |
| Version: | 22.11 | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
|
Description
Bob Ewart
2023-02-25 04:12:02 UTC
I used the following script based on the `sip_cli_emulator` to test SIP sucessfully:
```
#!/bin/bash
export host=127.0.0.1
export port=6001
export sipuser=SIP-HH1
export sippass=<the_sip_users_koha_password>
export library=DE-H253
export patron=<my_patron_barcode>
export item=<my_item_barcode>
# Note that on the Linux shell we should use CR to avoid clutter in
# the return statements
export terminator=CR
for mode in 'checkout' 'renew' 'checkin'; do
echo "------------------------"
echo "$mode: $item to $patron"
/usr/share/koha/bin/sip_cli_emulator.pl -m $mode -a $host -p $port -su $sipuser -sp $sippass -l $library -t $terminator --patron $patron --item $item
sleep 5
done
```
which works fine for the operations checkout, renew, and checkin as defined. My SIP users get `circulation` permissions and I cross checked that they can log in to the OPAC.
My SIP patrons are defined in Koha like:
contactname: ""
surname: "Terminal 1"
firstname: "Self Service Hamburg"
dateexpiry: "2099-12-31"
address2: "System DESY"
userid: "SIP-HH1"
cardnumber: "SIP-HH1"
categorycode: "S"
password: "sectret1"
branchcode: "DE-H253"
dateenrolled: "2024-01-01"
(Koha 24.05.01)
The script works for me - the preferred way to run it would be from within:
sudo koha-shell {instance}
That will ensure you are the Koha user and have all the necessary environment variables set.
|