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. TEST PLAN: 1) Create 2 issuing rules, one more specific with no hard due date, one less specific *with* a hard due date. See my description above for an example. 2) Issue an item to a borrower where the more specific rule should apply, and the checkout should not receive a hard due it. 3) Observe that it *does* receive a hard due date. 4) Apply the patch, and repeat step 2. 5) Observe that the checkout *does not* receive a hard due date.
Created attachment 11617 [details] [review] 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.
Created attachment 11636 [details] [review] [SIGNED-OFF] 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>
I followed the test plan, and confirm that the problem exists in master and is resolved by this patch.
This is not an enhancement. Increased severity to 'normal'
Fixes an insidious error with GetHardDueDate. Marking Passed QA.
Patch pushed to master
Pushed to 3.8.x will be in 3.8.5