[Bug 6858] New: Adds staticfines.pl for static fines processing
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6858 Bug #: 6858 Summary: Adds staticfines.pl for static fines processing Classification: Unclassified Change sponsored?: --- Product: Koha Version: rel_3_6 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Circulation AssignedTo: kyle.m.hall@gmail.com ReportedBy: matthias.meusburger@biblibre.com QAContact: koha-bugs@lists.koha-community.org CC: gmcharlt@gmail.com Add a tool to calculate static fine. For example, 7 days left = 1€ fixed 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=6858 Matthias Meusburger <matthias.meusburger@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|kyle.m.hall@gmail.com |matthias.meusburger@biblibr | |e.com -- 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=6858 --- Comment #1 from Matthias Meusburger <matthias.meusburger@biblibre.com> 2011-09-09 08:46:18 UTC --- Created attachment 5378 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5378 Bug 6858: Adds staticfines.pl for static fines processing -- 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=6858 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent CC| |nengard@gmail.com Patch Status|--- |Needs Signoff -- 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=6858 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|rel_3_6 |Rel_3_8 --- Comment #2 from Paul Poulain <paul.poulain@biblibre.com> 2011-10-24 11:38:22 UTC --- Updating Version : This ENH will be for Koha 3.8 -- 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=6858 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|Rel_3_8 |master --- Comment #3 from Paul Poulain <paul.poulain@biblibre.com> 2011-10-25 15:06:00 UTC --- Bug versionned for master. entries will be made against rel_3_8 once the patch has been applied (see thread about that on koha-devel yesterday) -- 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=6858 --- Comment #4 from claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> 2011-11-04 10:59:29 UTC --- Created attachment 6197 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6197 Bug 6858: Adds staticfines.pl for static fines processing Add a tool to calculate static fine. For example, 7 days left = 1€ fixed 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. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6858 claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |claire.hernandez@biblibre.c | |om -- 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=6858 claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Does not apply --- Comment #5 from claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> 2011-12-02 13:47:13 UTC --- $ git bz apply 6858 Bug 6858 - Adds staticfines.pl for static fines processing Bug 6858: Adds staticfines.pl for static fines processing Apply? [yn] y Applying: Bug 6858: Adds staticfines.pl for static fines processing /home/claire/dev/community_repo/koha/.git/rebase-apply/patch:175: trailing whitespace. error: misc/cronjobs/staticfines.pl: already exists in index Patch failed at 0001 Bug 6858: Adds staticfines.pl for static fines processing 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-6858-Adds-staticfinespl-for-static-fines-proce-LGi2ve.patch -- 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=6858 claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Does not apply |Needs Signoff --- Comment #6 from claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> 2011-12-02 14:53:01 UTC --- Forget it, applies well with a 3-way merge in git bz (In reply to comment #5) -- 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=6858 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2011-12-21 07:20:58 UTC --- Patches both apply - which patch is obsolete? Can you explain a bit more about how this works? How often should this be run? -- 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=6858 --- Comment #8 from Matthias Meusburger <matthias.meusburger@biblibre.com> 2012-02-03 13:17:29 UTC --- Hi Katrin, The two attached patches are the same, only the "from" md5 differs, so I guess we can safely get rid of one of them. This patch allows to apply only one fine for a given borrower, no matter how many items are late, based on a given delay, which applies to the most late item. The script bypasses overdue rules already defined in koha. Example : staticfines.pl --category CAT1, 10 --category CAT2, 20 --library LIB1 --library LIB2 --delay 20 This will charge a 10€ fine for borrowers of category CAT1 and a 20€ fine for borrowers of category CAT2 for libraries LIB1 and LIB2, after a 20 days overdue delay for their most late item. This script is typically used on a daily cronjob basis. -- 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=6858 delaye <stephane.delaye@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stephane.delaye@biblibre.co | |m --- Comment #9 from delaye <stephane.delaye@biblibre.com> --- the 9 march 2012 in the sandbox test1 I apply the patch I test the command : perl staticfines.pl -category J14,10 -library MAURES -delay 2 for the borrwernumber 5103 borrowernumber | categorycode | date_due | +----------------+--------------+------------+ | 5103 | J14 | 2012-03-07 | but nothing in the borrower account i test with all the option in the system preference finmode...but nothing.... mistake with finemode ? -- 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=6858 Koha Team Lyon 3 <koha@univ-lyon3.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |koha@univ-lyon3.fr --- Comment #10 from Koha Team Lyon 3 <koha@univ-lyon3.fr> --- I don't really understand how to test this patch... Can you propose a test plan ? -- 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=6858 MathildeF <mathilde.formery@ville-nimes.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |mathilde.formery@ville-nime | |s.fr --- Comment #11 from MathildeF <mathilde.formery@ville-nimes.fr> --- OK testing with : syspref : finesMode on "calculate and bill" ("calculer et facturer" in french) and run "misc/cronjobs/fines.pl" -- 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=6858 --- Comment #12 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- For a user (of a given category and library) with several overdues, launch the script : staticfines.pl --category CAT,AMOUNT --library LIB --delay DELAY Then, check that the user has been charged of AMOUNT if the due date of the most late item plus the delay is *before* today. One day later, re-execute the script with the same parameters and check that the fine has not been charged twice. Eventually, try to execute the script with various combinations of categories, amounts, libraries and delays, and check that it applies to the right patrons. You may edit the $debug and $bigdebug variables in the script to make it more verbose, and check what it does during its execution. Do you need more informations ? -- 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=6858 --- Comment #13 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- MathildeF, the script to execute is staticfines.pl (fines.pl is the "standard" way of applying fines) -- 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=6858 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5378|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=6858 --- Comment #14 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: * good test plan in comment 12, thanks * not PERLCRITIC compliant: "require" statement with library name as string at line 38, column 12. Use a bareword instead. (Severity: 5) Bareword file handle opened at line 143, column 1. See pages 202,204 of PBP. (Severity: 5) Two-argument "open" used at line 143, column 1. See page 207 of PBP. (Severity: 5) (I think the 1st one can't be avoided, but the 2 others should) * this script is completely new, and: - will have to be documented/advertised - can't break anything if not used, so will pass QA once the perlcritic stuff is OK * Mathilde, I feel you haven't successfully tested that it work. Am I wrong ? If i'm not, it mean the patch is not signed off for 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=6858 MathildeF <mathilde.formery@ville-nimes.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff --- Comment #15 from MathildeF <mathilde.formery@ville-nimes.fr> --- (In reply to comment #14)
* Mathilde, I feel you haven't successfully tested that it work. Am I wrong ? If i'm not, it mean the patch is not signed off for now
I make the test before the test plan. (In reply to comment #14) I took the test before the test-plan. the result was good, but with the sandbox, I have not been able to test again the next day. -- 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=6858 delaye <stephane.delaye@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #16 from delaye <stephane.delaye@biblibre.com> --- i test and it's good th escrit add record in accountlines Note : the scrip don't work if the date in caldenar is closed. -- 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=6858 Matthias Meusburger <matthias.meusburger@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6197|0 |1 is obsolete| | --- Comment #17 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- Created attachment 8516 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8516&action=edit Bug 6858: Adds staticfines.pl for static fines processing Add a tool to calculate static fine. For example, 7 days left = 1€ fixed fine -- 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=6858 --- Comment #18 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- This new patch : - updates documentation (about fines not applied on holidays) - corrects typos in documentation (option --use-borrower-library) - adds a message (when debug mode is enabled) to tell that the fine will not be applied if we're currently on a holiday - fixes two deprecated "use hashref as a reference" - fixes the two fixable errors raised by perlcritic This patch does not modify the script's behaviour, but might be re-tested though. -- 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=6858 --- Comment #19 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 8521 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8521&action=edit Bug 6858: Adds staticfines.pl for static fines processing Add a tool to calculate static fine. For example, 7 days left = 1€ fixed fine Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com> -- 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=6858 delaye <stephane.delaye@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8516|0 |1 is obsolete| | Attachment #8521|0 |1 is obsolete| | --- Comment #20 from delaye <stephane.delaye@biblibre.com> --- Created attachment 8522 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8522&action=edit Bug-6858-Adds-staticfinespl-for-static-fines-proce.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=6858 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent (DO NOT USE) |P5 - low Status|Signed Off |Passed QA CC| |paul.poulain@biblibre.com Version|master |rel_3_8 --- Comment #21 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: * new and isolated script, that can't harm anything outside from the script itself * passed perlcritic * a few tabs, i've replaced by spaces * if run with --help, I get the documentation, it's OK * if run without any parameters, the script seems to do some work, start writing a report file (in /tmp), that, at the end is empty. An improvement would be to show doc & quit when the script is run without any parameters, but, if I understand well, it's not supposed to be, so won't fail QA for that overall = passed QA, and if you want to provide a follow-up to die when no parameters are given, it will be welcomed ! -- 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=6858 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master -- 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=6858 --- Comment #22 from Paul Poulain <paul.poulain@biblibre.com> --- Warning = we have found some (complex) cases where this script make wrong calculations. A follow-up will be sent in a few days -- 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=6858 Matthias Meusburger <matthias.meusburger@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8522|0 |1 is obsolete| | --- Comment #23 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- Created attachment 9772 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9772&action=edit Bug 6858: Adds staticfines.pl for static fines processing Add a tool to calculate static fine. For example, 7 days left = 1€ fixed fine Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com> -- 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=6858 --- Comment #24 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- This new patch : - Fixes calculation bugs - Removes -o option for logs (which wasn't working anyway) - Adds a --borrower <borrowernumber> option for applying the fine only to one given borrower -- 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=6858 Matthias Meusburger <matthias.meusburger@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |In Discussion -- 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=6858 Matthias Meusburger <matthias.meusburger@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |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=6858 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #25 from Paul Poulain <paul.poulain@biblibre.com> --- QA comments: * requires +use Modern::Perl;, good point * passes perlcricit * independant script that can't harm the rest of Koha if it's bugguy * clean some code passes QA SIDE COMMENT: Matthias, I see that you compare dues dates. Have you seen Jonathan comment on koha-devel about the due_date now being a date AND time column in the database (to handle hourly loans) ? Have you tested there's no possible side effect ? (I don't think so, but sharing just to be sure you haven't missed a test case) -- 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=6858 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master Severity|enhancement |normal --- Comment #26 from Paul Poulain <paul.poulain@biblibre.com> --- This patch has been pushed on 3.10, and should be backported on 3.8 because it fixes a problem on the script available in 3.8 -- 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=6858 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #27 from Chris Cormack <chris@bigballofwax.co.nz> --- Paul is right, this script exists in 3.8.0, (and 3.8.1) so will push this bugfix to it for 3.8.2 -- 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=6858 --- Comment #28 from Chris Cormack <chris@bigballofwax.co.nz> --- Side note, I have updated the commit message to be a little more informative, Matthias you wrote really good comments on the bug, if you put that in the commit message that would have been even more awesome :) http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=484f4a999827d9fa... -- 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=6858 Viktor Sarge <viktor.sarge@regionhalland.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |viktor.sarge@regionhalland. | |se --- Comment #29 from Viktor Sarge <viktor.sarge@regionhalland.se> --- This one sounds just like what I will need for migrating a library I have coming up. But is it possible already to separate so that overdue loans get charged right away if there are holds on them - while loans with no holds get charged after say a week? And if that can be done - can I also set separate rules for rental media? I know this question is a bit OT with all the testing discussions going on, but I´d love to know how much can be done with this patch and what we´d have to expand the functionality. -- 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=6858 --- Comment #30 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- Hi Viktor, Perhaps you could create another ticket for the enhancements you'd like to have, so we can close this ticket, as the patch has already been pushed ? -- 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=6858 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=8420 -- 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=6858 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=13018 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org