[OPEN-ILS-GENERAL] Circulation Policies - list?

Yamil Suarez ysuarez at berklee.edu
Fri Nov 7 13:39:51 EST 2014


Jennifer,

Here is a SQL query I came up with that was based on something that
Ben Shum once posted. It shows all of my circ policies, and the "human
readable" values from most of the circ policies tables by joining with
the related tables.

SELECT ccmm.id AS "ID", ccmm.active AS "Active",
   org.shortname AS "copy_circ_lib",
   pgt.name AS "Patron Group", ccmm.circ_modifier AS "Circ Modifier",
   loc.name AS "copy_location",
   ccmm.is_renewal AS "Renewal?", ccmm.circulate AS "Circulate?",
   crcd.name AS "Circ Duration", crrf.name AS "Recurring Fine",
   ccmm.grace_period,
   crmf.name AS "Max Fine", limit_set.items_out AS "Max Items Out",
   array_to_string(array_agg(lscm.circ_mod), ', ') AS "Limited Circ Mods"

FROM config.circ_matrix_matchpoint ccmm
   INNER JOIN actor.org_unit aou ON aou.id = ccmm.org_unit
   INNER JOIN permission.grp_tree pgt ON pgt.id = ccmm.grp
   INNER JOIN config.rule_circ_duration crcd ON crcd.id = ccmm.duration_rule
   INNER JOIN config.rule_recurring_fine crrf ON crrf.id =
ccmm.recurring_fine_rule
   INNER JOIN config.rule_max_fine crmf ON crmf.id = ccmm.max_fine_rule
   LEFT OUTER JOIN config.circ_matrix_limit_set_map map ON
map.matchpoint = ccmm.id
   LEFT OUTER JOIN config.circ_limit_set limit_set ON limit_set.id =
map.limit_set
   LEFT OUTER JOIN config.circ_limit_set_circ_mod_map lscm ON
lscm.limit_set = limit_set.id
   LEFT OUTER JOIN actor.org_unit org on (ccmm.copy_circ_lib = org.id)
   LEFT OUTER JOIN asset.copy_location loc on (loc.id = ccmm.copy_location)
WHERE ccmm.copy_circ_lib = 101
GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12, 13
ORDER BY copy_circ_lib, pgt.name, ccmm.circ_modifier;

You may want someone that know SQL to make some tweaks make it look
the way you need, for example by change what you sort by. Right now it
is sorting by the copy circulation library, the patron group, and the
circ modifier.

Hope it helps,
Yamil





On Fri, Nov 7, 2014 at 12:53 PM, Walz, Jennifer <jlwalz at asbury.edu> wrote:
> All –
>
>
>
> We already have a rather complicated and multipage circ policies list.   Is
> there ANY way that we can view it and print out the WHOLE list?   Rather
> than the view in the staff client where we see only one page at a time and
> cannot copy or print the whole table.
>
>
>
>   You can also only sort on the data that is in the current view.  It does
> not sort the whole table, but one page at a time.  Very frustrating!
>
>
>
> On a side note, it would also be great if this table worked like other
> tables where you can change the size of the columns.   Or even better not
> see some of the columns and have the whole table fit on one screen!   That
> would be marvelous.
>
>
>
>   Any help would be very much appreciated.
>
>
>
> Thanks!
>
>
>
> Jennifer
>
>
>
> --------------------------------------------------
> Jennifer Walz, MLS – person designated to deal with the ILS
> Kinlaw Library -  Asbury University
> One Macklem Drive, Wilmore, KY 40390
> 859-858-3511 ext. 2269
> jlwalz at asbury.edu
>
>



-- 



--------------------------------

Yamil Suarez, MCS
Library System Administrator/Developer

Stan Getz Library
Berklee College of Music
1140 Boylston St
Boston, MA 02215

ysuarez at berklee.edu
617-747-2617


More information about the Open-ils-general mailing list