Bug 8640 - GetHardDueDate functions incorrectly
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 14 Aug 2012 17:17:38 +0000 (13:17 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 29 Aug 2012 22:01:49 +0000 (10:01 +1200)
commit8327455dd545006b8ab10dd990036a52eb1958c6
tree230465a44c6151d00ad2a007596fe5f6c7571cb0
parentb6724f8544cfb7c3952cc8c981dafc88693c4cf3
Bug 8640 - GetHardDueDate functions incorrectly

GetHardDueDate works just like GetIssuingRule, but it not only tests for having
found an row of results before returning, but checks for the existence of a
hard due date as well. That means that even if it finds a matching rule, unless
that rule has a hardduedate set it will toss it and keep looking!

So, for example, even though there is a matching rule for say "STAFF / VIDEO / *",
but it has no hardduedate. So it gets tossed and the subroutine keeps looking.
If the next match, "STAFF / * / *" *has* a hardduedate, it is the one returned.

This means that if a more specific rule has no hard due date,
it is overridden by a less specific rule that does have a hard due date.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
C4/Circulation.pm