Advertisement
chrissharp123

Untitled

May 31st, 2024
541
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.10 KB | None | 0 0
  1. # create new FF circ mods
  2.  
  3. for i in kit realia-0 realia-1 realia-2; do
  4. 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'"
  5. done
  6.  
  7. # create circ & hold rules for the new circ mods
  8. for i in kit realia-0 realia-1 realia-2; do
  9.         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"
  10.         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"
  11. done
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement