Comment 11 for bug 677074

Revision history for this message
Dan Wells (dbw2) wrote :

Yes, I am talking about plain old ordering values. What they lack in elegance they make up for in simplicity (which is a kind of elegance all its own :) It is also a common enough requirement in software that I can't think handling it would be a barrier.

I am not sure what you mean when you say "distinctions between different org unit based settings become harder to decide on overall". I'd expect that any rule set in the current ou will trump rules in its parent, and so on up the line.

If an administrator can simply set the order in which the rules are processed, then rules which are either important or unusual will be near the top and rules which are less important or more broad will be closer to the bottom. I think it provides the necessary flexibility while still keeping it pretty easy and natural to understand.

I'm well aware that I may be exposing my ignorance, as I haven't worked out every possible detail, but consider the following really simplified example. Say a library (BR1) has the following in mind. They want to circulate books for 2 weeks, cdroms for 1 week, DVDs for 3 days, and reference items (of any type) for 1 hour. However, they don't have DVD players, so reference DVDs are not subject to the one hour rule. If using rule order to determine importance, we might have a matrix like:

CIRC_MOD REFERENCE DURATION_RULE

dvd ANY 3 days
ANY TRUE 1 hour
book ANY 2 weeks
cdrom ANY 1 week
...

(ANY simply means the value is not set, and therefore matches everything)

We know that, no matter what, DVDs circ for 3 days, so we put that at the top. We also know that, other than that case, all other reference items circ for 1 hour, so we put that next. The last two lines then catch the other non-reference cases. For any given item, we find the first 'true' rule which sets duration rule, set it, then presumably proceed to other rules which will each set one or more of the other needed attributes while ignoring any specified durations.