'bool'
);
-INSERT INTO config.z3950_index_field_map
- (id, label, metabib_field, z3950_attr_type) VALUES
-(1, oils_i18n_gettext(1, 'Title', 'czifm', 'label'), 5, 'title'),
-(2, oils_i18n_gettext(2, 'Author', 'czifm', 'label'), 8, 'author'),
-(3, oils_i18n_gettext(3, 'ISBN', 'czifm', 'label'), 18, 'isbn'),
-(4, oils_i18n_gettext(4, 'ISSN', 'czifm', 'label'), 19, 'issn'),
-(5, oils_i18n_gettext(5, 'LCCN', 'czifm', 'label'), 30, 'lccn');
-
-INSERT INTO config.z3950_index_field_map
- (id, label, record_attr, z3950_attr_type) VALUES
-(6, oils_i18n_gettext(6, 'Pubdate', 'czifm', 'label'),'pubdate', 'pubdate'),
-(7, oils_i18n_gettext(7, 'Item Type', 'czifm', 'label'),'item_type', 'item_type');
-
-
--- let's leave room for more stock mappings
-SELECT SETVAL('config.z3950_index_field_map_id_seq'::TEXT, 1000);
-
-INSERT INTO config.org_unit_setting_type
- (name, grp, label, description, datatype)
- VALUES (
- 'cat.z3950.batch.max_parallel',
- 'cat',
- oils_i18n_gettext(
- 'cat.z3950.batch.max_parallel',
- 'Maximum Parallel Z39.50 Batch Searches',
- 'coust',
- 'label'
- ),
- oils_i18n_gettext(
- 'cat.z3950.batch.max_parallel',
- 'The maximum number of Z39.50 searches that can be in-flight at any given time when performing batch Z39.50 searches',
- 'coust',
- 'description'
- ),
- 'integer'
- );
-
-INSERT INTO config.org_unit_setting_type
- (name, grp, label, description, datatype)
- VALUES (
- 'cat.z3950.batch.max_results',
- 'cat',
- oils_i18n_gettext(
- 'cat.z3950.batch.max_results',
- 'Maximum Z39.50 Batch Search Results',
- 'coust',
- 'label'
- ),
- oils_i18n_gettext(
- 'cat.z3950.batch.max_results',
- 'The maximum number of search results to retrieve and queue for each record + Z39 source during batch Z39.50 searches',
- 'coust',
- 'description'
- ),
- 'integer'
- );
-
--- long overdue stuff...
-
-INSERT INTO config.org_unit_setting_type
- (name, grp, datatype, label, description) VALUES
-(
- 'circ.longoverdue_immediately_available',
- 'circ', 'bool',
- oils_i18n_gettext(
- 'circ.longoverdue_immediately_available',
- 'Long-Overdue Items Usable on Checkin',
- 'coust',
- 'label'
- ),
- oils_i18n_gettext(
- 'circ.longoverdue_immediately_available',
- 'Long-overdue items are usable on checkin instead of going "home" first',
- 'coust',
- 'description'
- )
-), (
- 'circ.longoverdue_materials_processing_fee',
- 'finance', 'currency',
- oils_i18n_gettext(
- 'circ.longoverdue_materials_processing_fee',
- 'Long-Overdue Materials Processing Fee',
- 'coust',
- 'label'
- ),
- oils_i18n_gettext(
- 'circ.longoverdue_materials_processing_fee',
- 'Long-Overdue Materials Processing Fee',
- 'coust',
- 'description'
- )
-), (
- 'circ.max_accept_return_of_longoverdue',
- 'circ', 'interval',
- oils_i18n_gettext(
- 'circ.max_accept_return_of_longoverdue',
- 'Long-Overdue Max Return Interval',
- 'coust',
- 'label'
- ),
- oils_i18n_gettext(
- 'circ.max_accept_return_of_longoverdue',
- 'Long-overdue check-in processing (voiding fees, re-instating ' ||
- 'overdues, etc.) will not take place for items that have been ' ||
- 'overdue for (or have last activity older than) this amount of time',
- 'coust',
- 'description'
- )
-), (
- 'circ.restore_overdue_on_longoverdue_return',
- 'circ', 'bool',
- oils_i18n_gettext(
- 'circ.restore_overdue_on_longoverdue_return',
- 'Restore Overdues on Long-Overdue Item Return',
- 'coust',
- 'label'
- ),
- oils_i18n_gettext(
- 'circ.restore_overdue_on_longoverdue_return',
- 'Restore Overdues on Long-Overdue Item Return',
- 'coust',
- 'description'
- )
-), (
- 'circ.void_longoverdue_on_checkin',
- 'circ', 'bool',
- oils_i18n_gettext(
- 'circ.void_longoverdue_on_checkin',
- 'Void Long-Overdue Item Billing When Returned',
- 'coust',
- 'label'
- ),
- oils_i18n_gettext(
- 'circ.void_longoverdue_on_checkin',
- 'Void Long-Overdue Item Billing When Returned',
- 'coust',
- 'description'
- )
-), (
- 'circ.void_longoverdue_proc_fee_on_checkin',
- 'circ', 'bool',
- oils_i18n_gettext(
- 'circ.void_longoverdue_proc_fee_on_checkin',
- 'Void Processing Fee on Long-Overdue Item Return',
- 'coust',
- 'label'
- ),
- oils_i18n_gettext(
- 'circ.void_longoverdue_proc_fee_on_checkin',
- 'Void Processing Fee on Long-Overdue Item Return',
- 'coust',
- 'description'
- )
-), (
- 'circ.void_overdue_on_longoverdue',
- 'finance', 'bool',
- oils_i18n_gettext(
- 'circ.void_overdue_on_longoverdue',
- 'Void Overdue Fines When Items are Marked Long-Overdue',
- 'coust',
- 'label'
- ),
- oils_i18n_gettext(
- 'circ.void_overdue_on_longoverdue',
- 'Void Overdue Fines When Items are Marked Long-Overdue',
- 'coust',
- 'description'
- )
-), (
- 'circ.longoverdue.xact_open_on_zero',
- 'finance', 'bool',
- oils_i18n_gettext(
- 'circ.longoverdue.xact_open_on_zero',
- 'Leave transaction open when long overdue balance equals zero',
- 'coust',
- 'label'
- ),
- oils_i18n_gettext(
- 'circ.longoverdue.xact_open_on_zero',
- 'Leave transaction open when long-overdue balance equals zero. ' ||
- 'This leaves the lost copy on the patron record when it is paid',
- 'coust',
- 'description'
- )
-), (
- 'circ.longoverdue.use_last_activity_date_on_return',
- 'circ', 'bool',
- oils_i18n_gettext(
- 'circ.longoverdue.use_last_activity_date_on_return',
- 'Long-Overdue Check-In Interval Uses Last Activity Date',
- 'coust',
- 'label'
- ),
- oils_i18n_gettext(
- 'circ.longoverdue.use_last_activity_date_on_return',
- 'Use the long-overdue last-activity date instead of the due_date to ' ||
- 'determine whether the item has been checked out too long to ' ||
- 'perform long-overdue check-in processing. If set, the system ' ||
- 'will first check the last payment time, followed by the last ' ||
- 'billing time, followed by the due date. See also ' ||
- 'circ.max_accept_return_of_longoverdue',
- 'coust',
- 'description'
- )
-);
-
--- mark long-overdue reactor
-
-INSERT INTO action_trigger.reactor (module, description) VALUES
-( 'MarkItemLongOverdue',
- oils_i18n_gettext(
- 'MarkItemLongOverdue',
- 'Marks a circulating item as long-overdue and applies configured ' ||
- 'penalties. Also creates events for the longoverdue.auto hook',
- 'atreact',
- 'description'
- )
-);
-
-INSERT INTO action_trigger.validator (module, description) VALUES (
- 'PatronNotInCollections',
- 'Event is valid if the linked patron is not in collections processing ' ||
- 'at the context org unit'
-);
-
-INSERT INTO action_trigger.event_definition
- (id, active, owner, name, hook, validator, reactor, delay, delay_field)
-VALUES (
- 49, FALSE, 1, '6 Month Overdue Mark Long-Overdue',
- 'checkout.due', 'PatronNotInCollections',
- 'MarkItemLongOverdue', '6 months', 'due_date'
-);
-
-INSERT INTO action_trigger.event_params (event_def, param, value) VALUES
- (49, 'editor', '''1''');
-
--- new longoverdue and longervdue.auto hook.
-
-INSERT INTO action_trigger.hook (key,core_type,description) VALUES (
- 'longoverdue',
- 'circ',
- 'Circulating Item marked long-overdue'
-);
-
-INSERT INTO action_trigger.hook (key,core_type,description) VALUES (
- 'longoverdue.auto',
- 'circ',
- 'Circulating Item automatically marked long-overdue'
-);
-
--- sample longoverdue.auto notification reactor
-
-INSERT INTO action_trigger.event_definition
- (id, active, owner, name, hook, validator, reactor, group_field, template)
- VALUES (
- 50, FALSE, 1, '6 Month Long Overdue Notice',
- 'longoverdue.auto', 'NOOP_True', 'SendEmail', 'usr',
-$$
-[%- USE date -%]
-[%- user = target.0.usr -%]
-To: [%- params.recipient_email || user.email %]
-From: [%- params.sender_email || default_sender %]
-Subject: Overdue Items Marked Long Overdue
-
-Dear [% user.family_name %], [% user.first_given_name %]
-The following items are 6 months overdue and have been marked Long Overdue.
-
-[% FOR circ IN target %]
- [%- copy_details = helpers.get_copy_bib_basics(circ.target_copy.id) -%]
- Title: [% copy_details.title %], by [% copy_details.author %]
- Call Number: [% circ.target_copy.call_number.label %]
- Shelving Location: [% circ.target_copy.location.name %]
- Barcode: [% circ.target_copy.barcode %]
- Due: [% date.format(helpers.format_date(circ.due_date), '%Y-%m-%d') %]
- Item Cost: [% helpers.get_copy_price(circ.target_copy) %]
- Total Owed For Transaction: [% circ.billable_transaction.summary.balance_owed %]
- Library: [% circ.circ_lib.name %]
-
-[% END %]
-$$);
-
--- ENV for above
-
-INSERT INTO action_trigger.environment (event_def, path) VALUES
- (50, 'target_copy.call_number'),
- (50, 'usr'),
- (50, 'billable_transaction.summary'),
- (50, 'circ_lib.billing_address'),
- (50, 'target_copy.location');
-- OUS's for patron self-reg
INSERT INTO config.org_unit_setting_type