Hard Due Dates Circ Rule RFC

From Koha Wiki
Jump to navigation Jump to search

Hard Due Dates Circ Rule

Status: unknown
Sponsored by: Goddard College
Developed by: Ian Walls, ByWater Solutions.
Expected for: 2010-12-28
Bug number: Bug 5548
Work in progress repository: No URL given.
Description: This development shall enable libraries to specify global and/or ceiling due dates for specific combinations of branchcode, item type and patron category.

Management of hard due dates

The management of global and ceiling due dates shall take place in the Circulation Rules section of administration.

There shall be one new column in the circulation matrix, with two fields.

The column shall be labeled “Hard Due Date”.

The first field shall be a dropdown with the choices:

  • “on or before” - corresponds to ‘ceiling’ due date
  • “exactly on” - corresponds to ‘global’ due date
  • “on or after” - new feature

The second field shall be a date field, with a JavaScript calendar for easy date selection and automatic formatting.

Specifying “DEFAULT” for any of branchcode, item type or patron category shall behave exactly as the other circulation rules behave, and multiple rules shall be called in the order laid out at the top of the Circulation Rules page.

Using global/ceiling due dates

If a due date is specified for a specific borrower/item/branch combination, the calculated due date shall be overridden in the following situations:

  • If the first field preference was “exactly on”, then the calculated due date shall be replaced by the Hard Due Date
  • If the first field preference was “on or before”, then the calculated due date shall be replaced by the Hard Due Date ONLY IF the calculated due date is after the Hard Due Date. Otherwise, the calculated due date shall be used.
  • If the first field preference was “on or after”, then the calculated due date shall be replaced by the Hard Due Date ONLY IF the calculated due date is before the Hard Due Date. Otherwise, the calculated due date shall be used.

Updating the Hard Due Date in the administrative interface SHALL NOT change the due date of items already checked out. The due date given to the patron at checkout time is the due date for the item.

Implementation

The development shall require two new database fields to be added to the circulation rules table. It will also require modifications to the existing due date calculation subroutine to fetch the Hard Due Date and on-before-after preference.

The updatedatabase.pl script shall modified to take the values from the Global and Ceiling Due Date system preferences, can copy them (if they exist) into DEFAULT/DEFAULT/DEFAULT rules in the new system. The old system preferences shall then be removed.