Bug 8640 - GetHardDueDate functions incorrectly
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 14 Aug 2012 17:17:38 +0000 (13:17 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 29 Aug 2012 16:07:53 +0000 (18:07 +0200)
commit88d5a2f2a4fe946e74855e271bd062ab721798a9
treed96c02e88dce0f8db36b4689fda477af3720e301
parent1adb0afa4c90473cbea4b2d8b54ed53477744322
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>
C4/Circulation.pm