LP1525394: Return Titles for All Hold Types in SIP The SIP Patron Status Response message can include hold titles if requested by the SIP client. This commit adds Issuance holds to the previous commit addressing part holds, and should finally represent full coverage for our hold types. Signed-off-by: Jason Boyer <jboyer@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
LP1525394 SIP patron part level holds respond blank Added code to flesh part level hold information in SIP/Patron.pm In order to test this, you will need to identify a patron who has a part level hold. Query SIP with a 63 message like: 6300120151211 104201 Y AOhidden|AApatronbarcode|AC|AY1AZF08D and the server should respond with the title in the |CD field for that part level hold. Signed-off-by: blake <blake@mobiusconsortium.org> Signed-off-by: Jason Boyer <jboyer@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
LP 1984114: Use Patron Preferred Name in SIP2 responses Use a patron's preferred first name, preferred second name, or preferred family name in SIP2 responses. If a preferred name field has no value, then the corresponding regular name field will be used. To test this patch, you can find a patron with a preferred name field set and look them up using a Patron Status Request message (23) via your favorite SIP2 client. Before applying the patch, the name field (AE) in the Patron Status Response message (24) will NOT use the patron's preferred name(s). After applying the patch and restarting Evergreen on the server, you repeat the previous Patron Status Request, and the response will now use the patron's preferred name(s) in the name field. Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
LP1528301 Add SIP Support for BF field on type 10 checkin responses This little patch will append the BF field in the SIP response during checkin when the item is for another hold. Some self check software vendors (ahem Bibliotheca) implement the hold phone number for the next patron this way. You will need this patch as well as the code change to the SIPServer repo LP1528301_Add_SIP_Support_for_BF_field_on_type_10_checkin_responses Signed-off-by: blake <blake@mobiusconsortium.org> Signed-off-by: Martha Driscoll <driscoll@noblenet.org> Signed-off-by: Jason Boyer <jboyer@equinoxinitiative.org> Signed-off-by: Martha Driscoll <driscoll@noblenet.org> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
lp1846354 additional tweaks and fixes * fixes for SIP * patron merge & purge * also tweak some storage code, which probably isn't being used for this anywhere * remove some legacy note code * don't filter out penalties with deleted messages for Notes count in patron staff display Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org> Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
LP 1889628: SIP2 Patron Username Lookup Allow SIP2 clients to pass the username or barcode in the SIP2 Patron Identifier field (AA). This is useful for services, such as Overdrive, that can send a patron's username. It is easier for a patron to remember their username rather than barcode, and this unifies login for those patrons who use their username to login to the OPAC. To make this possible, we modify the OpenILS::SIP::Patron->new method to accept a usrname key to retrieve patrons by usrname. We also modify the OpenILS::SIP->find_patron method to accept a usrname key to look up patrons. The find_partron method is further modified to check the patron id against the opac.barcode.regex in more or less the same manner as the OPAC. Two helper functions are added to OpenILS::SIP: 1. get_ou_setting: to retrieve org unit settings using the home_ou of the logged in SIP2 account. 2. get_barcode_regex: To retrieve and cache the opac.barcode_regex setting. Testing this requires a working SIP2 installation and a knowledge of the SIP protocols. The easiest thing is to install the patch and see if your SIP client can recognize a patron who has a username different from their barcode by using both their barcode and then their username. Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Bill Erickson <berickxx@gmail.com>
LP#1853363: add SIP2 option patron_status_always_permit_loans This patch adds a new oils_sip.xml login attribute called patron_status_always_permit_loans that specifies whether the charge privileges denied, renewal privilges denied, and card reported lost flags in the patron status block should be coerced to permissive values regardless of the actual state of the patron record. Turning this on works around an issue where a 2019-12 change by the Hoopla SIP2 client takes those flag fields into account, but some libraries may not wish those to block a patron's access to online resources that use SIP2 to authenticate. This setting can also be set as an implementation_config option; note that if it is set to 'true' or 'false' as a login attribute, the login attribute will override whatever is set in the implementation_config. To test ------- [1] Set up a test system that has SIPServer running. Also set up a patron that either has a standing penalty blocking CIRC or renewals, expired privileges, and/or a lost primary card. [2] Perform a SIP2 patron information request (message 63) for the patron created in step 1. Note that the charge, renewal, and card lost flag fields in the SIP2 response should be set to indicated that privileges are denied. [3] Apply the patch and enable patron_status_always_permit_loans either as a login attribute or a implementation_config option; oils_sip.xml.example in this patch contains examples. [4] Repeat step 2; this time, the three flag fields should have permissive values (i.e., they will be set to the space character) regardless of the state of the patron record. Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Jason Boyer <JBoyer@eoli.info> Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Lp 1799272: Option to Limit Hold Items in SIP2 msg 64 to Available This commit adds an implementation option to the oils_sip.xml that, when enabled, will limit the hold items list and hold items counts in the patron information response (response 64) to only the holds available for pickup by the patron. When the setting is not enabled, the full list of the patron's holds continues to be used. Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP1731021 SIP fine detail fee type additions Adds support for specifying different fee types in the fine/fee response based on the most recent billing type of each transaction. Thanks to Jason Stephenson for the initial implementation. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP1731021 SIP Fine detail repairs / display fields Resolve commit issues with the second commit from the source branch working/user/dpearl/LP1731021_fine_item_detail Migrating circ title/author lookup to use metabib display fields instead of MVR's. Minor code refactoring. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1731021: Support fine detail enhancement to SIP. The particular flavor of fine detail output is manufacturer dependent, although 3m is popular, and the default. To configure the selection, modify the /openils/conf/oils_sip.xml file. Testing: See the /openils/conf/oils_sip.xml file and test all supported values for the av_format option. You should also test the case where the option is omitted, or a non-supported value. I am not sure what happens if you supply more than one option with same or different values, but this is a non-supported degenerate case. For each test value, ensure tha the fine item detail is the expected format. Signed-off-by: Dan Pearl <dpearl@cwmars.org> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1796942 Treat VISA SIP payments as credit card Treat sip_payment_type 01 (VISA) as a credit_card_payment. Previously, we only handled payment type 02 (credit card) and 01 fell through to be treated as a cash_payment. Signed-off-by: Jeff Godin <jgodin@tadl.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
LP#1552778: copy some date/time utils from OpenSRF As preparation for subsequent bugfixes, this patch copies several date/time routines from OpenSRF::Utils to a new module, OpenILS::Utils::DateTime. Specifically, the routines copied over are: * clean_ISO8601() (renaming of the OpenSRF cleanse_ISO8601) * gmtime_ISO8601() * interval_to_seconds() * seconds_to_interval() This move will allow us to fix bugs in this core routines without requiring a mandatory OpenSRF upgrade. Furthermore, with the exception of interval_to_seconds() (and in only one place), none of those routines are used by OpenSRF itself. To test ------- [1] Apply the patch. [2] Verify that unit tests pass. [3] Verify that all Perl services start correctly. [4] Verify that date/time and interval calculations continue to work as expected, particularly in circulation. Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
LP#1659928: fix regression introduce by previous patches A couple other places that use the standing_penalty list needed to be adjusted to account for the non-de-fleshing. Kudos to Jason Etheridge for noting the live_t test failure. Also, unit tests FTW. Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP 1542495: Remove OpenILS::SIP::clean_text. This commit removes the OpenILS::SIP::clean_text utility function and all references to it in the OpenILS::SIP modules. Its job is now done in SIPServer's write_msg routine. Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Martha Driscoll <driscoll@noblenet.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP1659928 SIP is not respecting standing penalties for charge ok and hold ok This will include the block_list data in the blessed user object. This allows charge_ok, renew_ok and hold_ok to determine if any of the respective blocks are present in any of the applied penalties. To test ------- [1] Using a SIP emulator, issue a 63 message to fetch information about a patron that has nothing preventing it from doing loans, renewals, or hold requests, e.g., 6300020060329 201700Y AOevergreen|AA99999384262|| [2] Verify that the first six positions of the response are '64 Y ' [3] Apply a standing penalty that blocks circulation and repeat step 1. This time, the response should start with '64Y Y ' [4] Apply other standing penalties that block holds or renewals and repeate step 1, verifying that the various privileges denied positions in the 64 response have expected values. [5] Archive all of the penalties used during testing, then verify that the response returns to '64 Y ...' Signed-off-by: blake <blake@mobiusconsortium.org> Signed-off-by: Dan Pearl <dpearl@cwmars.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1612752 - Add cancel_time to action.transit_copy and friends. It is useful to have keep action.transit_copy rows intact when doing forensics on what happens after a staff member cancels a transit. Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1667221: (follow-up) remove comment that is now a lie Also, here's a test plan: [1] Edit /openils/conf/oils_sip.xml and set the currency defined in the implementation section to be something other than USD. [2] Start the SIP server and perform a patron information request; note that the BH field in the response contains 'USD'. [3] Apply the patch and restart the SIP server. [4] Repeat step 2; this time, the currency should be whatever is specified in oils_sip.xml. [5] Comment out the currency section in oils_sip.xml and restart the SIP server. [6] Repeat step 2; this time, the currency should be back to 'USD'. Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>