[Bug 4906] New: Problem with grace period calculation and fine intervals >1
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Summary: Problem with grace period calculation and fine intervals >1 Change sponsored?: --- Product: Koha Version: rel_3_2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Circulation AssignedTo: kyle.m.hall@gmail.com ReportedBy: katrin.fischer@bsz-bw.de QAContact: koha-bugs@lists.koha-community.org CC: gmcharlt@gmail.com Estimated Hours: 0.0 With a fine interval > 1 there is currently no way to avoid a effective grace period. Fines can not start the day after the due date. Configuration: With grace period = 1 fine interval 5 (= weekly, the library is closed Sunday and Saturday) Result: The first fine ist set 7 days after the item was due. Monday, checkout Tuesday, item due Wednesday Thursday Friday Saturday, holiday Sunday, holiday Monday, Tuesday, first fine Grace period for fine intervals > 1 should describe the days between the due date and the day the first fine is set. CalcFines() in Overdues.pm: 266 my $days_minus_grace = $daystocharge - $data->{'firstremind'}; 267 if ($data->{'chargeperiod'} > 0 && $days_minus_grace > 0 ) { 268 $amount = int($daystocharge / $data->{'chargeperiod'}) * $data->{'fine'}; -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|rel_3_2 |master --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2012-01-06 16:08:17 UTC --- Still valid :( -- 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. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|kyle.m.hall@gmail.com |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Assignee|katrin.fischer@bsz-bw.de |koha-bugs@lists.koha-commun | |ity.org -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Kyle, is there a reason you removed me as assignee from this bug? I know it's an old bug - but I have some code that would have worked before hourly loans an I hoped to look into this again before end of August. -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |katrin.fischer@bsz-bw.de |ity.org | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Katrin, I was trying to re-assign it to myself, but it looks like I only switched it to the default assignee. I was planning on taking a crack at this. -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Katrin, I was trying to re-assign it to myself, but it looks like I only switched it to the default assignee. I was planning on taking a crack at this, but I have re-assigned it back to you in case you get to it first. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 11507 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11507&action=edit Bug 4906 - Problem with grace period calculation and fine intervals >1 This patch adds the system preference FinesIncludeGracePeriod which allows the library the choice to include the grace period when calculating a fine ( Koha's current behavior ) or to ingore the grace period for the purposes of fines calculation. It is set by default to preserve the current behavior. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11507|0 |1 is obsolete| | --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 11508 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11508&action=edit Bug 4906 - Problem with grace period calculation and fine intervals >1 This patch adds the system preference FinesIncludeGracePeriod which allows the library the choice to include the grace period when calculating a fine ( Koha's current behavior ) or to ingore the grace period for the purposes of fines calculation. It is set by default to preserve the current behavior. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Srikanth Dhondi <srikanth@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |srikanth@catalyst.net.nz --- Comment #7 from Srikanth Dhondi <srikanth@catalyst.net.nz> --- Applying: Bug 4906 - Problem with grace period calculation and fine intervals
1 /home/srikanth/Projects/Koha/koha/.git/rebase-apply/patch:17: trailing whitespace. if ( C4::Context->preference('FinesIncludeGracePeriod') ) { error: patch failed: C4/Overdues.pm:264 error: C4/Overdues.pm: patch does not apply error: patch failed: installer/data/mysql/sysprefs.sql:374 error: installer/data/mysql/sysprefs.sql: patch does not apply error: patch failed: installer/data/mysql/updatedatabase.pl:5635 error: installer/data/mysql/updatedatabase.pl: patch does not apply Patch failed at 0001 Bug 4906 - Problem with grace period calculation and fine intervals >1 When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". Patch left in /tmp/Bug-4906---Problem-with-grace-period-calculation-a-w6Gl8z.patch
-- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11508|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 13515 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13515&action=edit Bug 4906 - Problem with grace period calculation and fine intervals >1 This patch adds the system preference FinesIncludeGracePeriod which allows the library the choice to include the grace period when calculating a fine ( Koha's current behavior ) or to ingore the grace period for the purposes of fines calculation. It is set by default to preserve the current behavior. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Srikanth Dhondi <srikanth@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #9 from Srikanth Dhondi <srikanth@catalyst.net.nz> --- Applying: Bug 4906 - Problem with grace period calculation and fine intervals
1 error: patch failed: installer/data/mysql/updatedatabase.pl:6055 error: installer/data/mysql/updatedatabase.pl: patch does not apply Patch failed at 0001 Bug 4906 - Problem with grace period calculation and fine intervals >1 When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". Patch left in /tmp/Bug-4906---Problem-with-grace-period-calculation-a-GyPe81.patch
-- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 --- Comment #10 from Srikanth Dhondi <srikanth@catalyst.net.nz> --- Created attachment 13570 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13570&action=edit [SIGNED-OFF]Bug 4906 - Problem with grace period calculation and fine intervals
1
This patch adds the system preference FinesIncludeGracePeriod which allows the library the choice to include the grace period when calculating a fine ( Koha's current behavior ) or to ingore the grace period for the purposes of fines calculation. It is set by default to preserve the current behavior. Signed-off-by: Srikanth Dhondi <srikanth@catalyst.net.nz> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Srikanth Dhondi <srikanth@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Srikanth Dhondi <srikanth@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13515|0 |1 is obsolete| | -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 --- Comment #11 from Srikanth Dhondi <srikanth@catalyst.net.nz> --- I think the system preference is called "FinesForGracePeriod" not "FinesIncludeGracePeriod". Could you confirm that? (In reply to comment #8)
Created attachment 13515 [details] Bug 4906 - Problem with grace period calculation and fine intervals >1
This patch adds the system preference FinesIncludeGracePeriod which allows the library the choice to include the grace period when calculating a fine ( Koha's current behavior ) or to ingore the grace period for the purposes of fines calculation. It is set by default to preserve the current behavior.
-- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 13574 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13574&action=edit Bug 4906 - Problem with grace period calculation and fine intervals >1 - Followup -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- You are correct. Thanks for catching that! (In reply to comment #11)
I think the system preference is called "FinesForGracePeriod" not "FinesIncludeGracePeriod". Could you confirm that?
-- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com Patch complexity|--- |Small patch --- Comment #14 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: the QA for this patch should not be a problem, because it's a small one. BUT I think it does not solve the problem katrin described in his initial description: if you set FinesIncludeGracePeriod, then there is no change in the behaviour, and you will still have the same result. The problem Katrin pointed in his description is the fact that the fine is placed *at the end* of each fine interval, not at the beginning. Your patch is related to another feature I think. Katrin, do you agree that this patch does not solve the problem you describe (it's a valuable ENH though, but maybe in another bug ?) -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mirko@abunchofthings.net -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Jan Kissig <jan.kissig@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jan.kissig@th-wildau.de --- Comment #15 from Jan Kissig <jan.kissig@th-wildau.de> --- I think what Paul stated is the bug Katrin described, the first fine should be charged after due-date + graceperiod. Now it is charged after due-date + grace + fine-interval. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 --- Comment #16 from Paul Poulain <paul.poulain@biblibre.com> --- (In reply to comment #15)
I think what Paul stated is the bug Katrin described, the first fine should be charged after due-date + graceperiod. Now it is charged after due-date + grace + fine-interval.
exactly ! -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #17 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- QA: Looking at this one now. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13570|0 |1 is obsolete| | Attachment #13574|0 |1 is obsolete| | --- Comment #18 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 15969 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15969&action=edit Bug 4906 - Problem with grace period calculation and fine intervals >1 This patch adds the system preference FinesIncludeGracePeriod which allows the library the choice to include the grace period when calculating a fine ( Koha's current behavior ) or to ingore the grace period for the purposes of fines calculation. It is set by default to preserve the current behavior. Signed-off-by: Srikanth Dhondi <srikanth@catalyst.net.nz> Rebased March 8, 2013. Included renaming pref. (marcelr) -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|katrin.fischer@bsz-bw.de |kyle@bywatersolutions.com Summary|Problem with grace period |Allow fine calculation to |calculation and fine |exclude grace period |intervals >1 | --- Comment #19 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Changing the title of this report and opening a new bug for the original one. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 --- Comment #20 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 15970 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15970&action=edit Bug 4906: Allow fine calculation to exclude grace period This patch adds the system preference FinesIncludeGracePeriod which allows the library the choice to include the grace period when calculating a fine ( Koha's current behavior ) or to ignore the grace period for the purposes of fines calculation. It is set by default to preserve the current behavior. Signed-off-by: Srikanth Dhondi <srikanth@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Rebased March 8, 2013. Included renaming pref. Works as advertised. Renamed the bug title and opened a new report for the original bug. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15969|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=9768 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #21 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- QA Comment: Kyle probably should have opened a new report for this development some time ago. I did now the other way around. Bug 9768 is the new old one :) This patch works as advertised. Code looks good to me. Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Can someone who tested this explain in a few words where the difference is between Kyle's change and what the bug was intended to do? I am a bit confused at this point :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 --- Comment #23 from Kyle M Hall <kyle@bywatersolutions.com> --- I think Paul explains it in comment 14. (In reply to comment #22)
Can someone who tested this explain in a few words where the difference is between Kyle's change and what the bug was intended to do? I am a bit confused at this point :)
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Srikanth Dhondi <srikanth@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|srikanth@catalyst.net.nz | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #24 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4906 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |new feature -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org