Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- looking at circ limits
- the logic is
- matrix 1850 is invoked, check the circ_matrix_limit_set_map
- it loads limit sets who say "how many items out"
- then it goes to the circ_limit_set_circ_mod_map and seews what circ mods to check against
- so to remove some you have to find the circ_limit_sets you want to keep and the circ_mod_map associated
- and delete the circ_mod_maps you don't want associated with that one
- */
- SELECT ccm.id AS "Circ Matrix Matchpoint ID", aou.shortname AS "Circ Short Org Unit Name",
- pgt.NAME AS "Permission Group Name", ccm.circ_modifier AS "Circ Modifier",
- lsm.id AS "Circ Matrix Limit Set Map ID", cls.id as "Circ Limit Set ID",
- cls.owning_lib AS "Circ Limit Set Owning Lib", aoucls.shortname AS "Circ Limit Set Owning Lib Name",
- cls.items_out "Circ Limit Set Items Out", cls.depth AS "Circ Limit Set Depth",
- cls.GLOBAL AS "Circ Limit Set Global", scmm.id as "Circ Limit Set Circ Mod Map ID",
- scmm.circ_mod AS "Circ Limit Set Circ Mod"
- FROM config.circ_matrix_matchpoint ccm
- LEFT JOIN actor.org_unit aou ON aou.id = ccm.org_unit
- LEFT JOIN actor.org_unit aou2 ON aou2.id = aou.parent_ou
- LEFT JOIN permission.grp_tree pgt ON pgt.id = ccm.grp
- LEFT JOIN config.rule_circ_duration dur ON dur.id = ccm.duration_rule
- LEFT JOIN config.rule_max_fine maxf ON maxf.id = ccm.max_fine_rule
- LEFT JOIN config.rule_recurring_fine recur ON recur.id = ccm.recurring_fine_rule
- LEFT JOIN config.hard_due_date hdd ON hdd.id = ccm.hard_due_date
- LEFT JOIN actor.org_unit aou3 ON aou3.id = ccm.copy_circ_lib
- LEFT JOIN actor.org_unit aou4 ON aou4.id = ccm.copy_owning_lib
- LEFT JOIN actor.org_unit aou5 ON aou5.id = ccm.user_home_ou
- LEFT JOIN config.circ_matrix_limit_set_map lsm ON lsm.matchpoint = ccm.id
- LEFT JOIN config.circ_limit_set cls ON cls.id = lsm.limit_set
- LEFT JOIN config.circ_limit_set_circ_mod_map scmm ON scmm.limit_set = lsm.id
- LEFT JOIN actor.org_unit aoucls ON aoucls.id = cls.owning_lib
- where aou.shortname = 'BCL' and ccm.circ_modifier in ('AUDIO','PLAYAWAY','AUDIO BOOK')
- -- and ccm.circ_modifier != scmm.circ_mod
- -- this will tell you where they don't match and effectively you have combined circ limits
- ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement