working/NCIPServer.git
22 months agoLp 1732485: Update README for bug work around. master
Jason Stephenson [Wed, 15 Nov 2017 16:32:44 +0000 (11:32 -0500)]
Lp 1732485: Update README for bug work around.

Add warning about the bug and suggest that the patch on that bug be
applied to /usr/share/perl5/HTTP/Body/XForms.pm.

Signed-off-by: Jason Stephenson <jason@sigio.com>
22 months agoLP1707668: Allow RenewItem Message to Respond
Jason Boyer [Mon, 31 Jul 2017 15:44:24 +0000 (11:44 -0400)]
LP1707668: Allow RenewItem Message to Respond

A couple of $ses->simplereq() calls had
->gather(1) on the end which causes crashes
on receiving a RenewItem message.

Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Signed-off-by: Jason Stephenson <jason@sigio.com>
2 years agoFix case of PerlSetEnv directives in the README.
Jason Stephenson [Thu, 18 May 2017 21:21:17 +0000 (17:21 -0400)]
Fix case of PerlSetEnv directives in the README.

It turns out that uppercase or mixed case both work, but mixed case is
used in the Mod Perl documentation examples, so we'll go with mixed
case in our README examples.

Signed-off-by: Jason Stephenson <jason@sigio.com>
2 years agoFix typo in previous commit.
Jason Stephenson [Thu, 18 May 2017 21:18:59 +0000 (17:18 -0400)]
Fix typo in previous commit.

The "env" in PerlSetENV needs to be all upper case.  It wasn't.  Guess
I should have had someone else review it before committing it.

Signed-off-by: Jason Stephenson <jason@sigio.com>
2 years agoLP 1691856: Update README
Jason Stephenson [Thu, 18 May 2017 20:58:22 +0000 (16:58 -0400)]
LP 1691856: Update README

Add
    PerlSetEnv DANCER_ENVIRONMENT "production"
to example Apache configuration to avoid a crash with newer OpenSRF
and Evergreen.  This change should not hurt with older OpenSRF or
Evergreen, either.

Signed-off-by: Jason Stephenson <jason@sigio.com>
2 years agoLP 1673971: Little more README cleanup.
Jason Stephenson [Sat, 8 Apr 2017 02:41:27 +0000 (22:41 -0400)]
LP 1673971: Little more README cleanup.

Two spaces after periods in some paragraphs.

Signed-off-by: Jason Stephenson <jason@sigio.com>
2 years agoLP 1673971: README fix.
Jason Stephenson [Sat, 8 Apr 2017 02:32:04 +0000 (22:32 -0400)]
LP 1673971: README fix.

Move the general paragraphs about Apache configuration out of the
Apache 2.2 section.

Signed-off-by: Jason Stephenson <jason@sigio.com>
2 years agoLP 1673971: Write a README.
Jason Stephenson [Wed, 5 Apr 2017 20:22:12 +0000 (16:22 -0400)]
LP 1673971: Write a README.

Signed-off-by: Jason Stephenson <jason@sigio.com>
2 years agoSet the ils to NCIP::ILS::Evergreen in the the sample NCIP.xml config.
Jason Stephenson [Wed, 5 Apr 2017 15:23:59 +0000 (11:23 -0400)]
Set the ils to NCIP::ILS::Evergreen in the the sample NCIP.xml config.

Since we've given up on the pretext of supporting Koha, and the tests
likely no longer work, it makes sens for ease of setup to make all of
the required configuration changes for the default setup ahead of
time.

Signed-off-by: Jason Stephenson <jason@sigio.com>
2 years agoLP 1673973: Remove the Koha code and make configuration changes.
Jason Stephenson [Wed, 5 Apr 2017 14:00:35 +0000 (10:00 -0400)]
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>
2 years agoReturn Item Barcode in RequestItemResponse
Jason Boyer [Sun, 7 Aug 2016 21:52:16 +0000 (17:52 -0400)]
Return Item Barcode in RequestItemResponse

When a target is successfully targeted handling a RequestItem message,
return the barcode of the targeted item.

Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Signed-off-by: Jason Stephenson <jason@sigio.com>
2 years agoCheck for external XML entities in NCIP.pm.
Jason Stephenson [Thu, 3 Nov 2016 14:12:19 +0000 (10:12 -0400)]
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>
3 years agoAdd fix to Evergreen driver for missing hold notification parameters. user/dyrcona/better_abstraction
Jason Stephenson [Thu, 25 Feb 2016 21:18:50 +0000 (16:18 -0500)]
Add fix to Evergreen driver for missing hold notification parameters.

When the default phone or sms hold notifications are empty strings,
the hold placement would fail.  This commit attempts to rectify that.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
3 years agoHandle shelf-expired holds in NCIP::ILS::Evergreen->checkinitem.
Jason Stephenson [Thu, 14 Jan 2016 16:40:59 +0000 (11:40 -0500)]
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>
3 years agoModify NCIP::ILS::Evergreen->find_location_failover.
Jason Stephenson [Mon, 14 Dec 2015 20:28:45 +0000 (15:28 -0500)]
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>
3 years agoUse dummy call number in NCIP::ILS::Evergreen->acceptitem.
Jason Stephenson [Wed, 2 Dec 2015 18:32:19 +0000 (13:32 -0500)]
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>
3 years agoCheck for eligible copies in NCIP::ILS::Evergreen->requestitem.
Jason Stephenson [Tue, 24 Nov 2015 16:54:48 +0000 (11:54 -0500)]
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>
3 years agoFix copy deletion in NCIP::ILS::Evergreen->checkinitem.
Jason Stephenson [Tue, 10 Nov 2015 20:05:31 +0000 (15:05 -0500)]
Fix copy deletion in NCIP::ILS::Evergreen->checkinitem.

We need to retrieve the copy again after a successful checkin because
its status and other details have changed.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
3 years agoUse default notifications for holds in NCIP::ILS::Evergreen.
Jason Stephenson [Tue, 10 Nov 2015 18:27:44 +0000 (13:27 -0500)]
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>
3 years agoMore CancelRequestItem functionality for NCIP::ILS::Evergreen.
Jason Stephenson [Tue, 3 Nov 2015 16:21:19 +0000 (11:21 -0500)]
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>
3 years agoCancel requests via RequestId in NCIP::ILS::Evergreen.
Jason Stephenson [Tue, 27 Oct 2015 17:13:42 +0000 (13:13 -0400)]
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>
3 years agoAdd creation of hold notes in NCIP::ILS::Evergreen.
Jason Stephenson [Tue, 27 Oct 2015 16:32:46 +0000 (12:32 -0400)]
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>
3 years agoSimplify RequestItem handling in NCIP::ILS::Evergreen.
Jason Stephenson [Fri, 23 Oct 2015 19:02:58 +0000 (15:02 -0400)]
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>
3 years agoFix bug with title hold in NCIP::ILS::Evergreen->place_hold.
Jason Stephenson [Thu, 22 Oct 2015 13:13:39 +0000 (09:13 -0400)]
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>
3 years agoAlter check_circ_details call in NCIP::ILS::Evergreen->renewitem.
Jason Stephenson [Fri, 9 Oct 2015 18:48:20 +0000 (14:48 -0400)]
Alter check_circ_details call in NCIP::ILS::Evergreen->renewitem.

This call to $self->check_circ_details() needs to use the new signature
when handling a renewitem message.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
3 years agoTry fixing NCIP::ILS::Evergreen->delete_copy()
Jason Stephenson [Fri, 9 Oct 2015 18:17:16 +0000 (14:17 -0400)]
Try fixing NCIP::ILS::Evergreen->delete_copy()

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
3 years agoMake some changes to NCIP::ILS::Evergreen->check_circ_details.
Jason Stephenson [Fri, 9 Oct 2015 17:57:17 +0000 (13:57 -0400)]
Make some changes to NCIP::ILS::Evergreen->check_circ_details.

Testing revealed some problems with the initial logic.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
3 years agoExpand NCIP::ILS::Evergreen->_call_number_search to include descendants.
Jason Stephenson [Mon, 5 Oct 2015 19:30:48 +0000 (15:30 -0400)]
Expand NCIP::ILS::Evergreen->_call_number_search to include descendants.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
3 years agoHandle invalid agencies in NCIP::ILS::Evergreen.
Jason Stephenson [Mon, 5 Oct 2015 18:41:44 +0000 (14:41 -0400)]
Handle invalid agencies in NCIP::ILS::Evergreen.

We modify NCIP::ILS::Evergreen->find_location_failover to return an
undefined value in the event of failure to lookup an agency.

We then modify the requestitem and cancelrequestitem handlers to
return a Problem message if the lookup fails for their selection
org. units.  These appear to be the only two places possilby
affected by a failure to find a location.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
4 years ago"Fix" templates/includes/problem.inc.
Jason Stephenson [Tue, 18 Aug 2015 14:32:34 +0000 (10:32 -0400)]
"Fix" templates/includes/problem.inc.

During testing I noticed that the Problem messages had an extra
newline in the ProblemType field.  This apparently causes problems
for Auto-Graphics' parser, so this commit removes it.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
4 years agoAdd error handling to NCIP::ILS::Evergreen->cancelrequestitem.
Jason Stephenson [Tue, 18 Aug 2015 13:27:54 +0000 (09:27 -0400)]
Add error handling to NCIP::ILS::Evergreen->cancelrequestitem.

We did not check the return value of open-ils.circ.hold.cancel, because
why would it fail?  Turns out there are a couple of reasons it could
fail, including not setting up permissions for the staff user correctly.

The cancel_hold helper function now returns the return value of the
open-ils.circ.hold.cancel method.  This method returns 1 on succes or
a reference ot an event hash on failure.

The cancelrequestitem method now returns a Problem response message
of Temporary Processing Failure if cancel_hold returns a ref.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
4 years agoSome defensive coding in NCIP::ILS.pm.
Jason Stephenson [Thu, 30 Jul 2015 13:38:55 +0000 (09:38 -0400)]
Some defensive coding in NCIP::ILS.pm.

XML::LibXML::Simple will return {} for an empty field.  We need to
check this on barcode input, at least, and undef the variable.  This
is done in the base class find_user_barcode and find_item_barcode
methods.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix typo in NCIP::ILS::Evergreen->lookupuser().
Jason Stephenson [Thu, 25 Jun 2015 17:51:41 +0000 (13:51 -0400)]
Fix typo in NCIP::ILS::Evergreen->lookupuser().

I had IdnetifierValue instead of IdentifierValue.  Is that something
I fixed in place during testing and forgot to fix in the repo?

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoA little more defensive programming in NCIP::ILS::Evergreen.
Jason Stephenson [Mon, 13 Apr 2015 11:42:48 +0000 (07:42 -0400)]
A little more defensive programming in NCIP::ILS::Evergreen.

If for some reason actor.usr.card does not have the id of a valid
barcode and we get nothing from it, we use the barcode that we
were given in the LookupUser request.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoA little defensive programming parsing oils_ncip.xml.
Jason Stephenson [Mon, 30 Mar 2015 00:19:16 +0000 (20:19 -0400)]
A little defensive programming parsing oils_ncip.xml.

If one leaves the <patrons> block alone, one gets the following Perl
error:

Can't use string as a HASH ref while "strict refs" in use at
/home/opensrf/NCIPServer/lib/NCIP/ILS/Evergreen.pm line 2626.

This commit attempts to avoid that.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoMove oils_ncip.xml.example to examples/.
Jason Stephenson [Sat, 7 Feb 2015 16:22:22 +0000 (11:22 -0500)]
Move oils_ncip.xml.example to examples/.

I realized that NCIPServer would possibly read oils_ncip.xml.example
if it were left in t/config_sample given that we use the Config::Merge
module.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoAdd oils_ncip.xml.example in t/config_sample.
Jason Stephenson [Sat, 7 Feb 2015 16:09:47 +0000 (11:09 -0500)]
Add oils_ncip.xml.example in t/config_sample.

This is the example configuration file needed for Evergreen.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoReimplement requestitem handler in NCIP::ILS::Evergreen.
Jason Stephenson [Mon, 19 Jan 2015 20:21:28 +0000 (15:21 -0500)]
Reimplement requestitem handler in NCIP::ILS::Evergreen.

Testing with Auto-Graphics suggests that our original logic was too
complicated, so we simplify it to only handle what Auto-Graphics
sends us.  We may want to implement a more generic handler in the
future when NCIPServer is used with more vendors.  However, it seems
fairly typical for responders to also be vendor specific.

While simplifying the logic, this commit gets rid of some unneeded
funtions.

We also fix a typo in the RequestItemResponse.inc template.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix an oops in NCIP::ILS::Evergreen.
Jason Stephenson [Tue, 6 Jan 2015 23:28:07 +0000 (18:28 -0500)]
Fix an oops in NCIP::ILS::Evergreen.

Forgot the service name on a simplereq call around line 800.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoChanges to NCIP::ILS::Evergreen as a result of testing.
Jason Stephenson [Sat, 20 Dec 2014 20:59:38 +0000 (15:59 -0500)]
Changes to NCIP::ILS::Evergreen as a result of testing.

These modifications are based on testing with Auto-Graphics and
reflect how they say they will be sending data in production. They
will return the ItemId that we are now returning in the response
to RequestItem so we can use that to find the appropriate hold to
cancel.

The above necessitated some internal changes to the code that
amounted to a simplification of placing holds (in some cases) as
well as a simplification in canceling holds. There is still some
cruft hanging around that should probably go away, but I think
we're safe for now.

We've also update some templates to fix issues while testing the
above mentioned changes, specifically RequestItemResponse.inc and
CancelRequestItemResponse.inc.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoModify NCIP::ILS::Evergreen->requestitem.
Jason Stephenson [Thu, 18 Dec 2014 19:58:16 +0000 (14:58 -0500)]
Modify NCIP::ILS::Evergreen->requestitem.

We now return AgencyId in the ItemId response field when returning a
database id and not barcode. If we can't figure out the AgencyId to
return, we set the ItemId/ItemIdentifierType to SYSNUMBER.

There's room for improvement here, but no time right now.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoReceive or abort transit in NCIP::ILS::Evergreen->checkoutitem.
Jason Stephenson [Sat, 13 Dec 2014 21:57:31 +0000 (16:57 -0500)]
Receive or abort transit in NCIP::ILS::Evergreen->checkoutitem.

If the copy is in transit to or from the working organizational
unit of the NCIP staff user, then we have to either receive or
abort the transit before the check out can proceed.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoChange CheckOutItemResponse.inc for whitespace.
Jason Stephenson [Fri, 12 Dec 2014 00:10:13 +0000 (19:10 -0500)]
Change CheckOutItemResponse.inc for whitespace.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix another template typo.
Jason Stephenson [Thu, 11 Dec 2014 23:48:19 +0000 (18:48 -0500)]
Fix another template typo.

That's what happens when you make big changes in testing.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix typo in UserId.in template include.
Jason Stephenson [Thu, 11 Dec 2014 20:43:57 +0000 (15:43 -0500)]
Fix typo in UserId.in template include.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoAdd ItemId to RequestItem output in NCIP::ILS::Evergreen.
Jason Stephenson [Thu, 11 Dec 2014 02:39:36 +0000 (21:39 -0500)]
Add ItemId to RequestItem output in NCIP::ILS::Evergreen.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFixup RequestItemResponse template include file.
Jason Stephenson [Thu, 11 Dec 2014 02:13:59 +0000 (21:13 -0500)]
Fixup RequestItemResponse template include file.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoReturn only 1 barcode for UserId in NCIP::ILS::Evergreen->lookupuser.
Jason Stephenson [Thu, 11 Dec 2014 00:14:13 +0000 (19:14 -0500)]
Return only 1 barcode for UserId in NCIP::ILS::Evergreen->lookupuser.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoAlter the template includes so that fields are in xsd order.
Jason Stephenson [Thu, 11 Dec 2014 00:09:47 +0000 (19:09 -0500)]
Alter the template includes so that fields are in xsd order.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoReturn the RequestId in the RequestItem message.
Jason Stephenson [Tue, 9 Dec 2014 23:33:39 +0000 (18:33 -0500)]
Return the RequestId in the RequestItem message.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years ago"Fix" ItemOptionalFields.inc.
Jason Stephenson [Tue, 9 Dec 2014 01:20:27 +0000 (20:20 -0500)]
"Fix" ItemOptionalFields.inc.

Because Auto-Graphics has problems with "carriage returns."

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix another "typo/thinko" in NCIP::ILS::Evergreen.
Jason Stephenson [Tue, 9 Dec 2014 00:55:24 +0000 (19:55 -0500)]
Fix another "typo/thinko" in NCIP::ILS::Evergreen.

Missed the 't' on an aout retrieve and ended pulling out an ou,
instead.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix a mistake in NCIP::ILS:Evergreen->find_target_via_bibliographic_id
Jason Stephenson [Tue, 9 Dec 2014 00:28:31 +0000 (19:28 -0500)]
Fix a mistake in NCIP::ILS:Evergreen->find_target_via_bibliographic_id

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix a typo on line 2790 of NCIP::ILS::Evergreen.
Jason Stephenson [Mon, 8 Dec 2014 23:28:33 +0000 (18:28 -0500)]
Fix a typo on line 2790 of NCIP::ILS::Evergreen.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoModify NCIP::ILS::Evergreen based on communication and testing.
Jason Stephenson [Sat, 6 Dec 2014 18:14:07 +0000 (13:14 -0500)]
Modify NCIP::ILS::Evergreen based on communication and testing.

Auto-Graphics is sending our target branch code in the ToAgencyId
field of the InitiationHeader.  They are not sending some of the
optional fields that we are looking for.  Most of the changes in
this commit revolve around using the ToAgencyId as a fallback
when the other fields are not available.  The focus of these
changes are the AcceptItem and RequestItem messages since the
local location is most important there.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix an inversion of author and title in NCIP::ILS::Evergreen->acceptitem.
Jason Stephenson [Fri, 5 Dec 2014 00:26:09 +0000 (19:26 -0500)]
Fix an inversion of author and title in NCIP::ILS::Evergreen->acceptitem.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoAnother template change that was missed in the previous commit.
Jason Stephenson [Sun, 26 Oct 2014 20:20:30 +0000 (16:20 -0400)]
Another template change that was missed in the previous commit.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoTemplates changes for Auto-graphics.
Jason Stephenson [Sun, 26 Oct 2014 19:27:14 +0000 (15:27 -0400)]
Templates changes for Auto-graphics.

They requested that we remove "carriage returns" from the output. I'm not
100% certain if he meant all carriage returns or if he just wanted the
weird spacing that some elements had where the open tag is on one line
followed by the value and the close tag on the next line. I don't really
know exactly why that was happening, but it seemed to have something to
do with trying to make the value come out on a line by its own between
the open and close tags. This change puts those elements on one line.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoTry setting the configuration directory from environment again.
Jason Stephenson [Sun, 26 Oct 2014 17:27:59 +0000 (13:27 -0400)]
Try setting the configuration directory from environment again.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoGet NCIP configuration directory from the environment.
Jason Stephenson [Sun, 26 Oct 2014 17:21:06 +0000 (13:21 -0400)]
Get NCIP configuration directory from the environment.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoSet application/xml content type in NCIP::Dancing.
Jason Stephenson [Sun, 26 Oct 2014 17:14:26 +0000 (13:14 -0400)]
Set application/xml content type in NCIP::Dancing.

I tried setting the default in config.yml, and it did not work.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix typo in previous commit.
Jason Stephenson [Sat, 25 Oct 2014 16:53:16 +0000 (12:53 -0400)]
Fix typo in previous commit.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoAdd output of phone numbers in NCIP::ILS::Evergreen->lookupuser.
Jason Stephenson [Sat, 25 Oct 2014 16:48:33 +0000 (12:48 -0400)]
Add output of phone numbers in NCIP::ILS::Evergreen->lookupuser.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoAdd NCIP::PhysicalAddress object.
Jason Stephenson [Fri, 24 Oct 2014 12:29:00 +0000 (08:29 -0400)]
Add NCIP::PhysicalAddress object.

I started to add this to the code last night to make addresses even
more abstract and extensible. Instead, I took a short cut. In the
light of the new day, I decided to go back and add this class as the
right thing to do.

We modify NCIP::ILS::Evergreen, NCIP::User::AddressInformation, and
the include for UserOptionalFields to make use of the new object.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoGet rid of the namespace prefix in templates and includes.
Jason Stephenson [Fri, 24 Oct 2014 02:05:40 +0000 (22:05 -0400)]
Get rid of the namespace prefix in templates and includes.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoMore fixes for includes/LookupUserResponse.inc.
Jason Stephenson [Fri, 24 Oct 2014 01:43:52 +0000 (21:43 -0400)]
More fixes for includes/LookupUserResponse.inc.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFixup a lot of stuff based on a first round of real testing.
Jason Stephenson [Fri, 24 Oct 2014 01:36:48 +0000 (21:36 -0400)]
Fixup a lot of stuff based on a first round of real testing.

Add ncip: namespace qualifier in templates and includes.

Reorder some fields because apparently the field order matters,
at least to xmllint when using the schema.

Make some code changes in NCIP::ILS::Evergreen to make sure that
date fields have the proper format. (This still needs testing, so
we'll see.)

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix response.tt and includes/data.inc issue.
Jason Stephenson [Thu, 23 Oct 2014 23:56:45 +0000 (19:56 -0400)]
Fix response.tt and includes/data.inc issue.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix a case issue in NCIP::Const::AUTHENTICATIONINPUT_MESSAGES.
Jason Stephenson [Thu, 23 Oct 2014 23:13:15 +0000 (19:13 -0400)]
Fix a case issue in NCIP::Const::AUTHENTICATIONINPUT_MESSAGES.

We had LookUpUser and it should have been LookupUser.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix a problem with acceptitem in NCIP::ILS::Evergreen.
Jason Stephenson [Tue, 14 Oct 2014 00:05:54 +0000 (20:05 -0400)]
Fix a problem with acceptitem in NCIP::ILS::Evergreen.

There was a logical error when checking RequestedActionType for
the "Hold For Pickup" action.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoDo for renewitem what was done for checkoutitem in previous commit.
Jason Stephenson [Sat, 11 Oct 2014 20:32:37 +0000 (16:32 -0400)]
Do for renewitem what was done for checkoutitem in previous commit.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix checkoutitem in NCIP::ILS::Evergreen.
Jason Stephenson [Sat, 11 Oct 2014 20:20:07 +0000 (16:20 -0400)]
Fix checkoutitem in NCIP::ILS::Evergreen.

Even though, the function documentation for checkout(.full) says
a copy object works, it apparently doesn't, so I switched to using
the copy_id parameter with $copy->id().

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix another typo in NCIP::ILS::Evergreen.
Jason Stephenson [Sat, 11 Oct 2014 18:32:53 +0000 (14:32 -0400)]
Fix another typo in NCIP::ILS::Evergreen.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix something found by perl -c from the previous commit.
Jason Stephenson [Sat, 11 Oct 2014 18:30:25 +0000 (14:30 -0400)]
Fix something found by perl -c from the previous commit.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoAdd find_copy_details_by_item to NCIP::ILS::Evergreen.
Jason Stephenson [Sat, 11 Oct 2014 18:28:53 +0000 (14:28 -0400)]
Add find_copy_details_by_item to NCIP::ILS::Evergreen.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoMore Doh! type things in NCIP::ILS::Evergreen.
Jason Stephenson [Sat, 11 Oct 2014 17:45:09 +0000 (13:45 -0400)]
More Doh! type things in NCIP::ILS::Evergreen.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoGet the pcrud method name correct.
Jason Stephenson [Sat, 11 Oct 2014 17:41:21 +0000 (13:41 -0400)]
Get the pcrud method name correct.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix NCIP::ILS::Evergreen->place_hold.
Jason Stephenson [Sat, 11 Oct 2014 17:38:23 +0000 (13:38 -0400)]
Fix NCIP::ILS::Evergreen->place_hold.

We better take into account what open-ils.circ.holds.create returns.

We check for an array of errors and use the first one.

We also look up the hold for the id returned. I forgot that it only
returns the id and not the whole hold object created.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix some warnings in NCIP::ILS::Evergreen.
Jason Stephenson [Sat, 11 Oct 2014 16:46:41 +0000 (12:46 -0400)]
Fix some warnings in NCIP::ILS::Evergreen.

Try to fix thes:

Use of uninitialized value in string eq at
/home/opensrf/NCIPServer/lib/NCIP/ILS/Evergreen.pm line 2553.
Use of uninitialized value in string eq at
/home/opensrf/NCIPServer/lib/NCIP/ILS/Evergreen.pm line 2589.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix typo on line 2748 of NCIP::ILS::Evergreen.
Jason Stephenson [Sat, 11 Oct 2014 16:38:44 +0000 (12:38 -0400)]
Fix typo on line 2748 of NCIP::ILS::Evergreen.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix some more stuff in NCIP::ILS::Evergreen.
Jason Stephenson [Sat, 11 Oct 2014 15:54:25 +0000 (11:54 -0400)]
Fix some more stuff in NCIP::ILS::Evergreen.

Running with perl -c caught another syntax error, and I saw that
I need hashrefs in a few places where I missed the {}.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix some things caught by perl -c in NCIP::ILS::Evergreen.
Jason Stephenson [Sat, 11 Oct 2014 15:50:52 +0000 (11:50 -0400)]
Fix some things caught by perl -c in NCIP::ILS::Evergreen.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoAdd handling of ItemElementType in NIP::ILS::Evergreen.
Jason Stephenson [Sat, 11 Oct 2014 15:45:52 +0000 (11:45 -0400)]
Add handling of ItemElementType in NIP::ILS::Evergreen.

This includes some template changes to output the ItemOptionalFields
element data.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix typo on line 2380 of NCIP::ILS::Evergreen.
Jason Stephenson [Sun, 5 Oct 2014 16:18:34 +0000 (12:18 -0400)]
Fix typo on line 2380 of NCIP::ILS::Evergreen.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoLast fix just gave us a different warning.
Jason Stephenson [Sun, 5 Oct 2014 16:14:25 +0000 (12:14 -0400)]
Last fix just gave us a different warning.

Try to fix it for real this time.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoTry to fix a warning when checking penalties.
Jason Stephenson [Sun, 5 Oct 2014 16:10:55 +0000 (12:10 -0400)]
Try to fix a warning when checking penalties.

Use of uninitialized value in pattern match (m//) at
/home/opensrf/NCIPServer/lib/NCIP/ILS/Evergreen.pm line 1595.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix typo in function name in NCIP::ILS::Evergreen.
Jason Stephenson [Sun, 5 Oct 2014 15:58:14 +0000 (11:58 -0400)]
Fix typo in function name in NCIP::ILS::Evergreen.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix copy and paste problem with previous commit.
Jason Stephenson [Sun, 5 Oct 2014 14:59:31 +0000 (10:59 -0400)]
Fix copy and paste problem with previous commit.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoAdd UserOptionalFields to more templates.
Jason Stephenson [Sun, 5 Oct 2014 14:56:38 +0000 (10:56 -0400)]
Add UserOptionalFields to more templates.

Also add checks for it in more messages for NCIP::ILS::Evergreen.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoAdd NCIP::ILS::Evergreen->handle_user_elements for flexibility.
Jason Stephenson [Sun, 5 Oct 2014 14:26:32 +0000 (10:26 -0400)]
Add NCIP::ILS::Evergreen->handle_user_elements for flexibility.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoAdd handling of NeedBeforeDate to NCIP::ILS::Evergreen->requestitem.
Jason Stephenson [Sun, 5 Oct 2014 14:02:35 +0000 (10:02 -0400)]
Add handling of NeedBeforeDate to NCIP::ILS::Evergreen->requestitem.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix problems with _problem_from_event in NCIP::ILS::Evergreen.
Jason Stephenson [Thu, 2 Oct 2014 00:40:15 +0000 (20:40 -0400)]
Fix problems with _problem_from_event in NCIP::ILS::Evergreen.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix mistake in NCIP::ILS::Evergreen on line 924.
Jason Stephenson [Thu, 2 Oct 2014 00:32:43 +0000 (20:32 -0400)]
Fix mistake in NCIP::ILS::Evergreen on line 924.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoAlter NCIP::ILS::Evergreen->_hold_search() to do just one thing.
Jason Stephenson [Sun, 28 Sep 2014 14:29:39 +0000 (10:29 -0400)]
Alter NCIP::ILS::Evergreen->_hold_search() to do just one thing.

Remove the code that had it return a problem if no holds were
found and make it the caller's responsibility to check if a hold
was returned or nothing.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix typos in NCIP::ILS::Evergreen caught by perl -c.
Jason Stephenson [Sun, 28 Sep 2014 14:22:28 +0000 (10:22 -0400)]
Fix typos in NCIP::ILS::Evergreen caught by perl -c.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoAdd cancelrequestitem handler to NCIP::ILS::Evergreen.
Jason Stephenson [Sun, 28 Sep 2014 14:19:45 +0000 (10:19 -0400)]
Add cancelrequestitem handler to NCIP::ILS::Evergreen.

Also add the CancelRequestItemResponse.inc to the templates.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoMore NCIP::ILS::Evergreen->requestitem() improvements.
Jason Stephenson [Sat, 27 Sep 2014 16:51:18 +0000 (12:51 -0400)]
More NCIP::ILS::Evergreen->requestitem() improvements.

We check if item is a NCIP::Problem and return it if it is.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoFix a comment typo in NCIP::ILS::Evergreen.
Jason Stephenson [Sat, 27 Sep 2014 16:11:47 +0000 (12:11 -0400)]
Fix a comment typo in NCIP::ILS::Evergreen.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoModify NCIP::ILS::Evergreen->requestitem to try a little harder.
Jason Stephenson [Sat, 27 Sep 2014 15:07:03 +0000 (11:07 -0400)]
Modify NCIP::ILS::Evergreen->requestitem to try a little harder.

Signed-off-by: Jason Stephenson <jason@sigio.com>
4 years agoSimplify NCIP::ILS::Evergreen->retrieve_org_unit_by_shortname().
Jason Stephenson [Sat, 27 Sep 2014 13:58:08 +0000 (09:58 -0400)]
Simplify NCIP::ILS::Evergreen->retrieve_org_unit_by_shortname().

Use open-ils.actor.org_unit.retrieve_by_shortname instead of a
pcrud search.

Signed-off-by: Jason Stephenson <jason@sigio.com>