Fix due date field in renew_item()

The RenewItem message has a 'DesiredDueDate' field, not just 'DueDate'

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Cancel holds in item_cancelled()

Before this fix, item_cancelled() does not work properly, since it never
cancels the hold placed in earlier steps.  For now, let's cancel the
hold and set the status to reshelving.

TODO:
 - more error checking
 - consider a different status, or don't set the status at all, and do
   a limited (e.g. no-op) checkin of some kind
 - consider a different hold cancel reason, including perhaps adding a
   new one

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Use 'noop' checkin for check_in_item()

Checkins can trigger other events, but since check_in_item() happens
behind the scenes, we can't really react properly to many events.

Making this checkin a 'noop' means fewer side-effects.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Better error checking

In update_copy_shipped(), return an event in both failure cases, then
make sure to fail() if an event comes back.

In place_simple_hold(), fail if we could not create the hold for any
reason.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Merge branch 'hektech-changes'

Changes from Dan Wells at Calvin College, from four pull requests:

fixes #10 - Fix due date field in renew_item()
fixes #11 - Better item cancelled
fixed #12 - No-op check in item
fixes #13 - Better error checking

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Add/move/change some comments

* Add comments in logic of item_cancelled to clarify where we are
the user vs item agency.

* Fix overlooked comment in cancel_hold, originally copied from
update_hold_pickup.

* Re-indent a comment in item_cancelled

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Make item_cancelled respect no_item_agency_holds

When enabled, the configuration option no_item_agency_holds prevents
holds from being created in Evergreen for requests where the
Evergreen system is acting as the item agency.

Libraries using this setting pull items based on paging slips
printed by the DCB client software, not Evergreen.

This change wraps the hold cancellation logic in item agency holds
within a conditional, similar to what is already done in
item_request. If we are configured to not create holds on item
agency requests, we have no need to attempt to cancel them or
attempt to change copy status.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Fix patron blocking in LookupUser

Not all standing penalties in Evergreen should cause a value to be
returned in the LookupUser BlockOrTrap element.

Uncomment existing code (originally from issa -- thanks, @Dyrcona!)
to iterate over penalties and only block on those whose block list
contains a certain set of block types.

We are now blocking only on standing penalties that contain HOLD or
CIRC in their block list.

Fixes #14.

Signed-off-by: Jeff Godin <jgodin@tadl.org>