Bug 4036

Summary: Two conditions missing from circ template messages: USERBLOCKEDOVERDUE and USERBLOCKEDREMAINING
Product: Koha Reporter: Owen Leonard <oleonard>
Component: CirculationAssignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: blocker    
Priority: P5 - low CC: chris, cmurdock, cookie.wolfrom, gmcharlt, henridamien, jwagner, katrin.fischer, nahuel.angelinetti
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: screenshot
Bugfix patch
Bugfix patch - Database Update

Description Chris Cormack 2010-05-21 01:22:23 UTC


---- Reported by oleonard@myacpl.org 2010-01-11 15:55:37 ----

From Circulation.pm:

    my ($blocktype, $count) = C4::Members::IsMemberBlocked($borrower->{'borrowernumber'});
    if($blocktype == -1){
        ## remaining overdue documents
        $issuingimpossible{USERBLOCKEDREMAINING} = $count;
    }elsif($blocktype == 1){
        ## blocked because of overdue return
        $issuingimpossible{USERBLOCKEDOVERDUE} = $count;
    }

There is no conditional markup for these states in circulation.tmpl, so if these conditions are triggered the circ template displays an yellow alert box with no content.



---- Additional Comments From oleonard@myacpl.org 2010-01-11 16:19:46 ----

In the relevant portion of Members.pm (line 572):

    my $sth = $dbh->prepare(
        "SELECT COUNT(*) as latedocs
         FROM issues
         WHERE borrowernumber = ?
         AND date_due < now()"
    );

If I try a similar query:

mysql> select date_due,returndate,issuedate from issues WHERE borrowernumber = 51 and date_due < now();
+------------+------------+------------+
| date_due   | returndate | issuedate  |
+------------+------------+------------+
| 2010-01-11 | NULL       | 2009-12-28 | 
| 2010-01-11 | NULL       | 2009-12-28 | 
| 2010-01-11 | NULL       | 2009-12-28 | 
| 2010-01-11 | NULL       | 2009-12-28 | 
| 2010-01-11 | NULL       | 2009-12-28 | 
| 2010-01-11 | NULL       | 2009-12-28 | 
+------------+------------+------------+

Is it correct that IsMemberBlocked() should return -1 if my checkouts are due today?



---- Additional Comments From katrin.fischer@bsz-bw.de 2010-02-08 09:14:22 ----

Created an attachment
screenshot





---- Additional Comments From katrin.fischer@bsz-bw.de 2010-02-08 09:14:46 ----

This is still a problem in 3.01.00.111 (patched from 3.01.61)

I am testing notices on our production server and test installation of 3.2. To compare the results, I use the same test cases and configuration.

Today I wanted to check out another book to a patron, who has already checked out one item with due date today.

In 3.01.61 I get no error message at all, in HEAD I get an empty yellow error box so that I can not check out to this patron.

I think it should warn the day after due date with a yes/no option for check out.




---- Additional Comments From henridamien@koha-fr.org 2010-02-10 13:42:55 ----

We should port the work done by BibLibre on finedays on 3.2



---- Additional Comments From gmcharlt@gmail.com 2010-02-10 14:41:34 ----

(In reply to comment #4)
> We should port the work done by BibLibre on finedays on 3.2
> 

Is the work in question in 3.0.x?



---- Additional Comments From oleonard@myacpl.org 2010-02-25 13:47:53 ----

Same problem in 3.0.x?

http://lists.katipo.co.nz/pipermail/koha/2010-February/022742.html



---- Additional Comments From gmcharlt@gmail.com 2010-02-25 15:29:00 ----

Following up on comment by Cynthia Murdock, there should be a setting to allow USERBLOCKEDOVERDUE to be overridable; not all libraries forbid loaning to patrons who have overdue loans.



---- Additional Comments From gmcharlt@gmail.com 2010-02-25 15:29:55 ----

S(In reply to comment #7)
> Following up on comment by Cynthia Murdock, there should be a setting to allow
> USERBLOCKEDOVERDUE to be overridable; not all libraries forbid loaning to
> patrons who have overdue loans.
> 

Sorry, completely borked the name - suggestion was from Cindy Murdock Ames.



---- Additional Comments From oleonard@myacpl.org 2010-02-25 15:31:56 ----

Was that really the intent, that users be blocked for ANY overdues? We could really use some feedback on this issue.



---- Additional Comments From katrin.fischer@bsz-bw.de 2010-02-25 15:38:23 ----

In my tests the items were not even overdue, they were just due. (Block starts on date of due date)




---- Additional Comments From kyle.m.hall@gmail.com 2010-03-03 15:21:08 ----

Created an attachment
Bugfix patch





---- Additional Comments From kyle.m.hall@gmail.com 2010-03-03 15:21:37 ----

Created an attachment
Bugfix patch - Database Update





---- Additional Comments From nahuel.angelinetti@biblibre.com 2010-03-03 15:41:23 ----

Hi,

We did another bugfix style, as we expect, an issues must be refused ONLY if there is an error during issuing. If there is a quota problem, or overdues or anything else, koha should ever ask librarian if he want to override or not the quota restriction.
We think all librarians are able to do this choice.



---- Additional Comments From chris@bigballofwax.co.nz 2010-04-26 08:10:28 ----

There is a patch for http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4405, that implements a systempreference to control this behaviour.

If that is accepted, this bug could be closed



---- Additional Comments From gmcharlt@gmail.com 2010-05-01 15:05:10 ----

Pushed patch for related http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4405.  Will apply parts of Kyle's patch to round out messages.



---- Additional Comments From gmcharlt@gmail.com 2010-05-01 16:52:59 ----

Submitted patches to deal with the following issues:

* fix wording per Kyle's suggetions
* don't count items due today as being overdue
* allow accrued fine days to be reported even if library permits loans to patron who have current overdue items
* fix swap of USERBLOCKEDOVERDUE and USERBLOCKEDREMAINING blocks



---- Additional Comments From gmcharlt@gmail.com 2010-05-03 11:47:27 ----

Pushed patches.  Please test and close.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:22 UTC  ---

This bug was previously known as _bug_ 4036 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4036
Imported an attachment (id=1794)
Imported an attachment (id=1795)
Imported an attachment (id=1796)

Actual time not defined. Setting to 0.0
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.
CC member jwagner@ptfs.com does not have an account here
The original submitter of attachment 1794 [details] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.
The original submitter of attachment 1795 [details] [review] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.
The original submitter of attachment 1796 [details] [review] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.

Comment 1 Chris Cormack 2010-05-22 04:59:21 UTC
Tested, this now works