Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # create new FF circ mods
- for i in kit realia-0 realia-1 realia-2; do
- echo psql -U evergreen -c "insert into config.circ_modifier (code, name, description, sip2_media_type, magnetic_media, avg_wait_time) select code || '-ff', name || '-ff', description || ' - fines free', sip2_media_type, magnetic_media, avg_wait_time from config.circ_modifier where code = '$i'"
- done
- # create circ & hold rules for the new circ mods
- for i in kit realia-0 realia-1 realia-2; do
- psql -U evergreen -c "insert into config.circ_matrix_matchpoint (org_unit, grp, circ_modifier, ref_flag, is_renewal, circulate, duration_rule, recurring_fine_rule, max_fine_rule, total_copy_hold_ratio, available_copy_hold_ratio, copy_circ_lib, copy_owning_lib, user_home_ou, renew_extends_due_date, renew_extend_min_interval) select org_unit, grp, circ_modifier || '-ff', ref_flag, is_renewal, circulate, duration_rule, (select id from config.rule_recurring_fine where name = 'no_fines'), (select id from config.rule_max_fine where name = 'no_fines'), total_copy_hold_ratio, available_copy_hold_ratio, copy_circ_lib, copy_owning_lib, user_home_ou, renew_extends_due_date, renew_extend_min_interval from config.circ_matrix_matchpoint where circ_modifier = '$i' and active = true"
- psql -U evergreen -c "insert into config.hold_matrix_matchpoint (active, user_home_ou, request_ou, pickup_ou, item_owning_ou, item_circ_ou, usr_grp, requestor_grp, circ_modifier, marc_type, marc_form, marc_vr_format, ref_flag, juvenile_flag, age_hold_protect_rule, holdable, distance_is_from_owner, transit_range, max_holds, include_frozen_holds, stop_blocked_user, strict_ou_match, marc_bib_level, item_age, description) select active, user_home_ou, request_ou, pickup_ou, item_owning_ou, item_circ_ou, usr_grp, requestor_grp, circ_modifier || '-ff', marc_type, marc_form, marc_vr_format, ref_flag, juvenile_flag, age_hold_protect_rule, holdable, distance_is_from_owner, transit_range, max_holds, include_frozen_holds, stop_blocked_user, strict_ou_match, marc_bib_level, item_age, description from config.hold_matrix_matchpoint where circ_modifier = '$i' and active = true"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement