User Tools

Site Tools


evergreen-admin:customization:circ

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
evergreen-admin:customization:circ [2009/10/26 18:37]
phasefx
evergreen-admin:customization:circ [2009/10/26 19:34] (current)
jamesrf
Line 5: Line 5:
 ===== Rule Tables ===== ===== Rule Tables =====
  
-Certain types of behavior ultimately come down to a handful of rule tables in the database. ​ The goal of both the circ scripts and the alternative matrix tables is to pick rows from those rule tables. ​ In older versions of Evergreen, you would configure these tables with the "​Open-ILS Bootstrapping Scripts",​ under "​Circulation and Holds Rules"​. ​ This interface lives by default at http://​localhost/​cgi-bin/​config.cgi (if you use a browser on the Evergreen itself. ​ Otherwise, you will need to tweak your Apache config to allow external access to those scripts and modify your URL as appropriate.) ​ You could also manage these tables directly in the database, for example, by using pgAdmin or psql.  FIXME  I thought all of the Bootstrapping interfaces were deprecated and replaced with "​Conify"​ interfaces, but I can't find any for the config.rules tables.+Certain types of behavior ultimately come down to a handful of rule tables in the database. ​ The goal of both the circ scripts and the alternative matrix tables is to pick rows from those rule tables. ​ In older versions of Evergreen, you would configure these tables with the "​Open-ILS Bootstrapping Scripts",​ under "​Circulation and Holds Rules"​. ​ This interface lives by default at http://​localhost/​cgi-bin/​config.cgi (if you use a browser on the Evergreen ​server ​itself. ​ Otherwise, you will need to tweak your Apache config to allow external access to those scripts and modify your URL as appropriate.) ​ You could also manage these tables directly in the database, for example, by using pgAdmin or psql.  FIXME  I thought all of the Bootstrapping interfaces were deprecated and replaced with "​Conify"​ interfaces, but I can't find any for the config.rules tables.
  
 ==== Circulation Duration (config.rule_circ_duration) ==== ==== Circulation Duration (config.rule_circ_duration) ====
Line 26: Line 26:
 The stock circ scripts (and in-db circ matrix) will always target the "​default"​ rule here.  An item circulating under this rule will start with 2 allowed renewals, and either circulate for 7, 14, or 21 days depending on the value of the item's //Loan Duration// field (which can have the values Short, Normal, or Long, corresponding with the **shrt**, **normal**, and **extended** columns in the rule table). The stock circ scripts (and in-db circ matrix) will always target the "​default"​ rule here.  An item circulating under this rule will start with 2 allowed renewals, and either circulate for 7, 14, or 21 days depending on the value of the item's //Loan Duration// field (which can have the values Short, Normal, or Long, corresponding with the **shrt**, **normal**, and **extended** columns in the rule table).
  
-The circ scripts reference these rules by the value in the **name** column. ​ The circ matrix tables reference these rules by the value in their **id** column. ​ A common practice is to embed the values for a rule into the rule name itself, as seen above, to make it easier to understand and manage the circ scripts. ​ It could also make sense to use names like "​audiobook"​ or "​bestseller",​ but those sort of labels are more often used with item //​circulation modifiers//,​ to push configurability more toward end-user staff and away from admins. ​ It also helps facilitate the configuration of rules that may be different per library in a shared system. ​ Consider that two libraries may both have an "​audiobook"​ circ modifier, yet based on the circ scripts, a different loan duration rule may be chosen. ​ If those loan duration rules are named after their values, then they'​ll never be changed and potentially surprise a library that targets them.+The circ scripts reference these rules by the value in the **name** column. ​ The circ matrix tables reference these rules by the value in the **id** column. ​ A common practice is to embed the values for a rule into the rule name itself, as seen above, to make it easier to understand and manage the circ scripts. ​ It could also make sense to use names like "​audiobook"​ or "​bestseller",​ but those sort of labels are more often used with item //​circulation modifiers//,​ to push configurability more toward end-user staff and away from admins. ​ It also helps facilitate the configuration of rules that may be different per library in a shared system. ​ Consider that two libraries may both have an "​audiobook"​ circ modifier, yet based on the circ scripts, a different loan duration rule may be chosen ​for each of them.  If the loan duration rules are named after their values, then they'​ll never be changed and potentially surprise a library that targets them.  However, if a shared system is strong on shared policies, it may be easier to manipulate the rule table itself whenever that policy changes. ​ It's up to you find the right balance for your system.
  
 ==== Recurring Fine Levels (config.rule_recuring_fine) ==== ==== Recurring Fine Levels (config.rule_recuring_fine) ====
Line 37: Line 37:
  
 ===== Circ Scripts ===== ===== Circ Scripts =====
 +FIXME Need more here + examples
 +
 +==== Description of Default Files ====
 +These files are found in /​openils/​var on your Evergreen server.
 +
 +=== circ/​circ_lib.js ===
 +  * this file contains a library of often used functions and constants. ​ these can be called in other scripts and you can add your own utility functions here.
 +  * Some examples:
 +    * findGroupConfig():​ returns the config values from circ_groups.js
 +    * isGroupDescendant( parent, child): returns true if the child patron group is a descendent of the parent
 +    * isPrecat: a constant that returns true/false if an item is a pre-cat
 +
 +=== circ/​circ_duration.js ===
 +  * this file is called when an item is checked out and results in:
 +    * loan duration rule
 +    * recurring fine rule
 +    * max fine rule
 +
 +=== circ/​circ_groups.js ===
 +  * this file determines patron limits
 +  * the function findGroupConfig() retrieves values from this file
 +    * this function is called in circ_permit_hold.js,​ circ_permit_patron.js and patron_penalty.js
 +
 +=== circ/​circ_permit_copy.js ===
 +=== circ/​circ_permit_patron.js ===
 +=== penalty/​patron_penalty.js ===
 +
 +=== circ/​circ_permit_hold.js ===
 +  * called on renewal, can be used to prevent holds
 +=== circ/​circ_permit_renew.js ===
 +  * called on renewal, can be used to prevent renewals
  
 ===== In-db Circ Matrix ===== ===== In-db Circ Matrix =====
evergreen-admin/customization/circ.1256596663.txt.gz · Last modified: 2009/10/26 18:37 by phasefx

© 2008-2017 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a member of Software Freedom Conservancy.