[Koha-bugs] [Bug 6328] Fine in days does not work

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 26 16:55:38 CEST 2011


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6328

--- Comment #23 from Fernando L. Canizo <conan at lugmen.org.ar> 2011-05-26 14:55:38 UTC ---
After Katrin comments I finally could appropriately test this patch. Sorry to
keep bothering you after all the sign-offs, but I'm not sure if this is the
desired behaviour.

I found a couple of things that I think should not work that way:

(I'm branching from origin/3.4.x, as rangi pointed out via irc)

A. You can checkout new items to a patron who is already late if you haven't
checked in the item that will cause debarrement. You only get a yellow message,
but it's still possible to lend items to patron.

Steps to reproduce:
1. define a rule in circulation rules which apply fine in days
2. loan a book to some patron who will get the rule just defined applied to
him/her
3. manually change the date_due in DB to one date (or wait enough days :P)

 update issues set date_due= <a_date_before_today> where borrowernumber =
<fill_in> and itemnumber = <fill_in>;

(I tested this on a clean DB with an issues table with only one loan, so I
didn't need the where clauses)

4. Now try to check out new items to patron and you'll be able to do it, when
you shouln't. You only get a message on the right, in the "Attention" box. You
can renew, check out and check in other items many times, as long as you don't
check in the item that will produce debarrement.

I believe it's not logic to keep lending items to a patron who will be debarred
upon check in. 

---

B. koha is watching for debarrement in more than one place: borrowers.debarred
and in old_issues. Making an on-the-fly calculation upon check out for the
debarred time left based on old_issues.date_due and old_issues.returndate, and
not looking into borrowers.debarred, which I think is the purposo of these
patches.

Steps to reproduce:
1. same as A
2. same as A
3. same as A
4. check in the item that will produce debarrement
5. patron gets debarred and a date is set in borrowers.debarred
6. lift debarrement and check DB:

select debarred from borrowers where borrowernumber = <subject_patron_number>;

In my test:

select debarred from borrowers where borrowernumber = 5;
+----------+
| debarred |
+----------+
| NULL     |
+----------+

So my patron is really NOT debarred now.

7. try to loan an item and you'll get this message:

Patron has had overdue items and is blocked for 3 day(s).

And you will be forbidden to loan an item to this patron, which you shouldn't
since you lifted the debarrement.

That's because Circulation is checking old_issues, and the only way to
administer this is to update database by hand, changing history!

---

C. Same as B but if your patron is from another library, he/she will not get
debarred. You can test it by reproducing B. and checking borrowers.debarred in
step 5.

---

I'm not sure if A is a feature. For B we need to modify circulation to stop
checking old_issues and consult borrowers instead. And for C, we need to
broaden the debarring rule to apply to any patron which we can loan to.

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the Koha-bugs mailing list