[Bug 4123] New: Error in checking whether a checkout can be renewed
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4123 Summary: Error in checking whether a checkout can be renewed Product: Koha Version: HEAD Platform: All OS/Version: All Status: NEW Severity: critical Priority: P5 Component: Circulation AssignedTo: gmcharlt@gmail.com ReportedBy: oleonard@myacpl.org Estimated Hours: 0.0 Change sponsored?: --- In Circulation.pm, part of sub CanBookBeRenewed: ----------------------------------------------- SELECT borrowers.categorycode, biblioitems.itemtype, issues.renewals, renewalsallowed, $controlbranch FROM issuingrules, issues LEFT JOIN items USING (itemnumber) LEFT JOIN borrowers USING (borrowernumber) LEFT JOIN biblioitems USING (biblioitemnumber) WHERE issuingrules.categorycode = borrowers.categorycode AND issuingrules.itemtype = $itype AND (issuingrules.branchcode = $controlbranch OR issuingrules.branchcode = '*') AND borrowernumber = ? AND itemnumber = ? ORDER BY issuingrules.categorycode desc, issuingrules.itemtype desc, issuingrules.branchcode desc LIMIT 1; ----------------------------------------------- I see that there is a check for a wildcard under issuingrules.branchcode. Should there not be a similar check with issuingrules.categorycode and issuingrules.itemtype? i.e. (issuingrules.categorycode = borrowers.categorycode OR issuingrules.categorycode = '*') (issuingrules.itemtype = $itype OR issuingrules.itemtype = '*') Without the wildcard option doesn't that mean you have to have a rule set up for each patron category/itemtype combination? -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4123 --- Comment #1 from Kyle Hall <kyle.m.hall@gmail.com> 2010-03-01 17:06:27 --- Created an attachment (id=1709) --> (http://bugs.koha.org/cgi-bin/bugzilla3/attachment.cgi?id=1709) This patch adds the code. Fixed our problem being unable to renew items. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4123 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |colin.campbell@ptfs- | |europe.com --- Comment #2 from Colin Campbell <colin.campbell@ptfs-europe.com> 2010-03-19 20:04:45 --- Even with the below patch applied I found at a single branch library that renew was not being allowed because the routine was not generating valid SQL. Problem seems to be with the controlbranch variable which does not have a valid value. The sql query looks very baroque and far too easily broken for such basic functionality. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4123 Ian Walls <ian.walls@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ian.walls@bywatersolutions.c | |om --- Comment #3 from Ian Walls <ian.walls@bywatersolutions.com> 2010-04-02 15:50:48 --- (In reply to comment #2)
Problem seems to be with the controlbranch variable which does not have a valid value.
If CircControl exists and is set to a value, this shouldn't be a problem. But, yes, the $controlbranch may require a default value in the event that CircControl fails. This should either be home or holding branch, but I'm not sure which (not that it matters in a single library environment, but it would if CircControl wasn't set in a multiple library install). -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4123 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |normal --- Comment #4 from Galen Charlton <gmcharlt@gmail.com> 2010-04-30 12:11:37 --- Pushed Kyle's patch to HEAD. Besides the $controlbranch issue, I view this only as a stopgap for 3.2, as it implements a behavior that could be subtly different from how loan rules are retrieved in other contexts, e.g., by GetIssuingRule. Straightening this out would be a Good Thing for 3.4; I know that BibLibre has sent some patches proposing an overhaul of the circ policy matrix, but more work (and test cases!) are needed. Leaving open but downgrading to 'normal'. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
bugzilla-daemon@kohaorg.ec2.liblime.com