Hi Kyle,

I started something like that 1 year ago (bug 8369 [1]). The problem is we lost foreign key to branchcode and categorycode.
I recommend you to read the discussion on this report before starting any development on issuingrules :)

Keep informed if you start it!

Regards,
Jonathan

[1] http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8369


2013/11/15 Kyle Hall <kyle.m.hall@gmail.com>
Hey all, this is something I've been thinking about for a while now, and I should probably throw it out there to see if it's just a terrible idea ; )

Right now we have 5 tables dealing with circulation rules. I think we can add much greater flexibility *and* simplicity to how we store and select rules.

Instead of having the assortment of branch/patron/item, and then the columns for the rules themselves. what if we had just one table with the following schema:

branchcode
categorycode
itemtype
rule_name
rule_value

For example, if every rule right now has a checkout length of 14, but have different max issue quantities, we need to set the checkout length to 14 for each and every combination. With this schema we could have just:
*, *, *, issuelength, 14
*,*, BOOK, maxissueqty, 20
*,*,DVD, maxissueqty, 5
*,*,CD, maxissueqty, 10

What does everyone think of this idea?

Kyle

http://www.kylehall.info
ByWater Solutions ( http://bywatersolutions.com )
Meadville Public Library ( http://www.meadvillelibrary.org )
Crawford County Federated Library System ( http://www.ccfls.org )
Mill Run Technology Solutions ( http://millruntech.com )

_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/