]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1766716: Emergency Closing handler
authorMike Rylander <mrylander@gmail.com>
Tue, 27 Feb 2018 21:49:57 +0000 (16:49 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 26 Jul 2018 18:59:14 +0000 (14:59 -0400)
commit5caa4344f460f8496589b641854634cf799a6dca
treea3753151cbbe1cab8b8ac940bd8061435bfd0e8d
parentb46d4eaac2a6b023c2cde2a1642ef61cb8206548
LP#1766716: Emergency Closing handler

New Feature Summary

Staff are provided with interfaces and mechanisms to create library closings
that, in addition to affecting future circulation and booking due dates, and
hold shelf expirations, will automatically move existing circulation and
booking due dates and hold shelf expiration times.  This new functionality is
conceptually described as Emergency Closings and business logic implementing it
as the Emergency Closing Handler. It contains additions and adjustments to the
user interface, business logic, and database layers.  Access to this
functionality is available through the Closed Dates Editor interface in the
staff client which has been ported to AngularJS.

Overview

This development has created new business logic code to inspect, in real time,
existing circulation, booking, and hold records, and modify such date and time
stamps so that the circulation, booking, or hold will end in the same state it
would have if the closing had existed at the time the circulation or booking
occurred, or the hold was placed and captured.  Of specific note, hourly loans
will have their due date adjusted to be the end of the day following the
closing.

When the Emergency Closing is saved, any fines accrued during the closing may
be voided, as settings dictate, with the exception of circulations that have
been marked as LOST or LONG OVERDUE.  That is, even for LOST and LONG OVERDUE
circulations with due dates that fall within the Emergency Closing, no fine
adjustment will be applied.  Emergency Closing processing is permanent, and
cannot be rolled back.

This functionality is explicitly initiated by staff action.  If staff do not
request an Emergency Closing, existing circulations, bookings, and holds will
not be processed and adjusted.  However, if staff request any Closing that
starts nearer in time than the length of the longest circulation duration
configured for use in the Evergreen instance they will be prompted with the
option to create the closing as an Emergency Closing.

Action/Trigger hooks have been created for circulations and bookings that are
adjusted by the Emergency Closing Handler.  These will facilitate the creation
of notifications to patrons that the due date has changed and to alert them to
potential changes in accrued fines.

Booking start dates are explicitly ignored in this implementation.  Because an
Emergency Closing is, by its nature, an unexpected event, it will be up to
staff to address any bookings which intersect with a new Emergency Closings.
Reports can be used to identify booking start dates that overlap with a closing
and that may require staff intervention.

Staff requsting and Emergency Closing must have the new EMERGENCY_CLOSING
permission.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
14 files changed:
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/perlmods/lib/OpenILS/Application/Actor/ClosedDates.pm
Open-ILS/src/sql/Pg/096.schema.emergency_closing.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/400.schema.action_trigger.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/sql_file_manifest
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.emergency_closing.sql [new file with mode: 0644]
Open-ILS/src/templates/staff/admin/local/actor/closed_dates.tt2 [new file with mode: 0644]
Open-ILS/src/templates/staff/admin/local/actor/edit_closed_dates.tt2 [new file with mode: 0644]
Open-ILS/src/templates/staff/config.tt2
Open-ILS/src/templates/staff/share/t_datetime.tt2
Open-ILS/web/js/ui/default/staff/admin/local/actor/closed_dates.js [new file with mode: 0644]
Open-ILS/web/js/ui/default/staff/services/org.js
Open-ILS/web/js/ui/default/staff/services/ui.js