LP 1833284: Option to send database id in LookupUser response Autographics can track users who change barcodes or have more than one barcode by using the user's unique ID. To implement this feature, we have added an option to return the user's unique database id instead of the barcode in the LookupUser response message. Autographics will use the database id to track the user on their side, and use the barcode that the patron entered in all other requests. The new option is lookupuser_send_database_id and can be activated in the patrons element of oils_ncip.xml. See the updated example for documentation comments. Signed-off-by: Jason Stephenson <jason@sigio.com>
LP 1673973: Remove the Koha code and make configuration changes. We've given up any pretense of sharing code with the Koha implementation of NCIPServer, so we remove the Koha.pm driver implementation. We also update the included configuration files for paths as expected in a typical Evergreen installation. Signed-off-by: Jason Stephenson <jason@sigio.com>
Check for external XML entities in NCIP.pm. Add an external entity handler to DOM creation in the main NCIP module's handle_initiation function. This handler dies and the error processing catches that error, logs that a possible XXE attack was detected and then returns undef. Signed-off-by: Jason Stephenson <jason@sigio.com>
Handle shelf-expired holds in NCIP::ILS::Evergreen->checkinitem. We modify the check_circ_details method to look for shelf-expired holds in addition to circulations and transits. It is also modified to better handle being used from the renewitem handler. We add the clear_expired flag when actually doing the checkin. Finally, a new helper _date_past is added to check if a date is in the past, and the _expired helper is modified to use the _date_past subroutine. Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Modify NCIP::ILS::Evergreen->find_location_failover. Comment out the code to strip everything up to and including the first - from the location field when trying to parse the input. Apparently, they've stopped adding extra crud on the front of our codes. The presence of this code is now causing problems for those locations that do have dashes in their shortnames in Evergreen. Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Use dummy call number in NCIP::ILS::Evergreen->acceptitem. We have received an AcceptItem message with a missing call number for the incoming copy. This prevents Evergreen from accepting the item because Evergreen needs a call number to link the new copy to the new bibliographic record. This commit will use either the FromAgencyId and RequestId concatenated or the copy barcode as the call number when no call number is provided. This may not be an issue with the use precats option. However, there are still issues with precats in Evergreen, so use of that option is strongly discouraged. Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Check for eligible copies in NCIP::ILS::Evergreen->requestitem. Add a method to count the number of copies available at the selection ou to fill the hold. Call this method from requestitem, and if it returns 0, send a problem response that the requested item will not be available by need by date. Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Use default notifications for holds in NCIP::ILS::Evergreen. When placing holds for our own patrons, we look up the user's settings for hold notifications and add those the hold parameters. If the patron has not set any defaults, we fall back to using email and day phone if these are available for the user. Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
More CancelRequestItem functionality for NCIP::ILS::Evergreen. Now, with abort transit action! The cancelrequestitem message handler can optionally abort the hold transit, if any. To activate this feature, add a section like: <holds> <abort_transit_on_cancel/> </holds> to your oils_ncip.xml configuration file inside the man <ncip> element. See examples/oils_ncip.xml.example. Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Cancel requests via RequestId in NCIP::ILS::Evergreen. Add a routine to search for holds via the RequestIdentifierValue of the CancelRequestItem message's RequestId. This searches action:: hold_request_note by title and body for uncancelled, unfilled holds where request_lib is equal to our working org. unit. If found, the corresponding hold is returned to be canceled. The original logic of searching by ItemId remains as a fallback when the above fails and for those cases where holds were placed before this logic was added. Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Add creation of hold notes in NCIP::ILS::Evergreen. We'll use the hold notes to store the RequestIdentifierValue that we're given in the RequestItem and AcceptItem messages. We'll use that note to find the appropriate hold for cancellation with the CancelRequestItem message, later. NOTE: This commit requires that the UPDATE_HOLD permission be granted to the NCIPServer staff user at the consortium level, i.e. depth 0. Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Simplify RequestItem handling in NCIP::ILS::Evergreen. Replace several subroutines and OpenILS calls to check for existing copies, holds, etc., and to check if the hold is possible before creating the hold with a single call to open-ils.circ.holds. test_and_create.batch. This call does everything in one step and leads to cleaner code for us. Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Fix bug with title hold in NCIP::ILS::Evergreen->place_hold. Add the selection_ou and selection depth to the parameters when checking if the title hold is possible. This will prevent the placement of holds that are basically unfillable. TODO: There is quite a bit of code here that could be simplified by using test and create instead of separate is possible and create calls. Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>