[OPEN-ILS-DEV] Circulation rules

Dan Scott denials at gmail.com
Mon May 19 22:14:31 EDT 2008


2008/5/19 Grant Johnson <fgjohnson at upei.ca>:
> Hi all,
>
> I need to have Groups of patrons.
>
> Staff, Graduates, Undergrads, Faculty, CURBA, Public etc...
>
> I can create the croups but how do I define default circ rules for a patron based on their "profile"?

Hi Grant:

Reading through the OpenILS/Application/Circ/Circulate.pm module, I
think most of this behaviour is defined in /openils/var/circ/*.js
using JSON:

  * circ_groups.js is where you define limits for various groups; the
'Patron' group is defined as an example. Remember that groups (defined
in the permission.grp_tree table) are hierarchical, so if you create a
child group Undergrads that has the Patron group as its parent, any
unspecified values will automatically be pulled from the parent group
(all the way up the chain until all settings are satisfied)

  * circ_item_config.js is where you define the circulation duration
rule, recurring fines rule, and maximum fines based on item type and
circulation modifier. The names you assign here have to have a
corresponding entry in config.rule_circ_duration table. The
circulation rule looks up the circulation modifier first (pulled from
the circmodifier column of the asset.copy table), then falls back to
the more generic item type rule.

Other rules, like holds, renewals, patron blocking, etc, are similarly
implemented. It sounds kind of scary, but really you're only dealing
with a handful of cleanly formatted JavaScript files and a couple of
database tables. And there is a lot of work going on to put a friendly
face on this configuration for 1.4 (as noted here:
http://open-ils.org/roadmap.php)

Dan

-- 
Dan Scott
Laurentian University


More information about the Open-ils-dev mailing list