[Bug 19336] New: Add option to fines.pl to apply maximal fine amount after delay
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Bug ID: 19336 Summary: Add option to fines.pl to apply maximal fine amount after delay Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: david.bourgault@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #1 from David Bourgault <david.bourgault@inlibro.com> --- Created attachment 67191 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67191&action=edit Bug 19336 - Add --maxfinesday option to fines.pl This is a functionality we have for some of our clients we want to push to the community. Adds the --maxfinesday argument to fines.pl which creates or updates a fine with the maximum amount set in the circulation rules after the delay has passed. e.g.: ./fines.pl --maxfinesdays 30 All item over 30 days late will have the maximal fine applied. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexbuckley@catalyst.net.nz Status|Needs Signoff |In Discussion --- Comment #2 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Hi David After checking out an item out with a due date set to be over 30 days ago and then running this cronjob I have found that the following error is thrown in the cronjob output: kohadev-koha@kohadevbox:/home/vagrant/kohaclone/misc/cronjobs$ ./fines.pl --maxfinesdays 30 DateTime::Duration does not overload comparison. See the documentation on the compare() method for details. at ./fines.pl line 129. And no maximum fine is added to the accountlines table -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |david.bourgault@inlibro.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #3 from David Bourgault <david.bourgault@inlibro.com> --- Created attachment 68318 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68318&action=edit Bug 19336 - Correct DateTime and Koha calls This fixes the 'DateTime does not overload' error. It also fixes the next error, which was that C4::GetIssuingRules is deprecated. Finally it now handles no overduefinescap being define (does nothing). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67191|0 |1 is obsolete| | --- Comment #4 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 68335 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68335&action=edit Bug 19336 - Add --maxfinesday option to fines.pl This is a functionality we have for some of our clients we want to push to the community. Adds the --maxfinesday argument to fines.pl which creates or updates a fine with the maximum amount set in the circulation rules after the delay has passed. e.g.: ./fines.pl --maxfinesdays 30 All item over 30 days late will have the maximal fine applied. Here is a test plan I followed based on above. Test plan: 1. Create circulation rule with Overdue fines cap set 2. Set finesMode systempreference to 'Calculate and charge' 3. Check out an item with the due date set 30 days ago 4. In Koha shell run ./fines.pl --maxfinesdays 30 5. There should now be a new fine in the accountlines table of the amount set in overdue fines cap Followed test plan, patch worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68318|0 |1 is obsolete| | --- Comment #5 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 68336 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68336&action=edit Bug 19336 - Correct DateTime and Koha calls This fixes the 'DateTime does not overload' error. It also fixes the next error, which was that C4::GetIssuingRules is deprecated. Finally it now handles no overduefinescap being define (does nothing). Passes QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alex.arnaud@biblibre.com --- Comment #6 from Alex Arnaud <alex.arnaud@biblibre.com> --- Hello David, What about $type and $unitcounttotal variables? If maxfinesdays is defined and amount != 0, they are empty. Indeed, $type is always empty since chargename is never populated. But this could be fixed in another BZ... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |alex.arnaud@biblibre.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Status|Signed Off |Failed QA --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Moving to FQA to trigger reaction from developter to question on comment#6 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |charles.farmer@inlibro.com Status|Failed QA |In Discussion --- Comment #8 from Charles Farmer <charles.farmer@inlibro.com> --- Despite the 'uninitialized value in join...' , I feel like $unitcounttotal shouldn't take any _numerical_ values. The concept of chargeunits stops making sense once you arbritraly charge the overduefinescap after X given days, which is exactly what maxfinesdays does. It's not bothered by closing hours, nor does it care about grace periods, it bluntly maxes out the fine. This seems like a reason not to consider any information derived from $issuing_rule->lengthunit. Now, as I hinted at the beginning, I'm definitely open to initializing $unitcounttotal. Since its only use is to be concanated with other fields before being outputed to a file, it could make sense to inform the fines report's reader that maxfinesdays was applied. Is this approach sound in your opinion? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68335|0 |1 is obsolete| | Attachment #68336|0 |1 is obsolete| | --- Comment #9 from Charles Farmer <charles.farmer@inlibro.com> --- Created attachment 75379 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75379&action=edit Bug 19336: Add --maxfinesday option to fines.pl This is a functionality we have for some of our clients we want to push to the community. Adds the --maxfinesday argument to fines.pl which creates or updates a fine with the maximum amount set in the circulation rules after the delay has passed. e.g.: ./fines.pl --maxfinesdays 30 All item over 30 days late will have the maximal fine applied. Here is a test plan I followed based on above. Test plan: 1. Create circulation rule with Overdue fines cap set 2. Set finesMode systempreference to 'Calculate and charge' 3. Check out an item with the due date set 30 days ago 4. In Koha shell run ./fines.pl --maxfinesdays 30 5. There should now be a new fine in the accountlines table of the amount set in overdue fines cap Followed test plan, patch worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #10 from Charles Farmer <charles.farmer@inlibro.com> --- Created attachment 75380 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75380&action=edit Bug 19336: (follow-up) Correct DateTime and Koha calls This fixes the 'DateTime does not overload' error. It also fixes the next error, which was that C4::GetIssuingRules is deprecated. Finally it now handles no overduefinescap being define (does nothing). Passes QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #11 from Charles Farmer <charles.farmer@inlibro.com> --- Created attachment 75381 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75381&action=edit Bug 19336: (QA follow-up) Initialize $unitcounttotal in case a report is written -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #12 from Charles Farmer <charles.farmer@inlibro.com> --- Rewrote the patch titles to abide by the standardized notation. Provided a way out of the 'In discussion' status by initializing $unitcounttotal to 'n/a', the common abbreviation used in a report for a field that does not apply. Back in Needs Signoff. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|david.bourgault@inlibro.com |charles.farmer@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75379|0 |1 is obsolete| | --- Comment #13 from Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> --- Created attachment 85914 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85914&action=edit Bug 19336: Add --maxfinesday option to fines.pl This is a functionality we have for some of our clients we want to push to the community. Adds the --maxfinesday argument to fines.pl which creates or updates a fine with the maximum amount set in the circulation rules after the delay has passed. e.g.: ./fines.pl --maxfinesdays 30 All item over 30 days late will have the maximal fine applied. Here is a test plan I followed based on above. Test plan: 1. Create circulation rule with Overdue fines cap set 2. Set finesMode systempreference to 'Calculate and charge' 3. Check out an item with the due date set 30 days ago 4. In Koha shell run ./fines.pl --maxfinesdays 30 5. There should now be a new fine in the accountlines table of the amount set in overdue fines cap Followed test plan, patch worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75380|0 |1 is obsolete| | --- Comment #14 from Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> --- Created attachment 85915 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85915&action=edit Bug 19336: (follow-up) Correct DateTime and Koha calls This fixes the 'DateTime does not overload' error. It also fixes the next error, which was that C4::GetIssuingRules is deprecated. Finally it now handles no overduefinescap being define (does nothing). Passes QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75381|0 |1 is obsolete| | --- Comment #15 from Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> --- Created attachment 85916 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85916&action=edit Bug 19336: (QA follow-up) Initialize $unitcounttotal in case a report is written -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85914|0 |1 is obsolete| | --- Comment #16 from Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> --- Created attachment 85917 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85917&action=edit Bug 19336: Add --maxfinesday option to fines.pl This is a functionality we have for some of our clients we want to push to the community. Adds the --maxfinesday argument to fines.pl which creates or updates a fine with the maximum amount set in the circulation rules after the delay has passed. e.g.: ./fines.pl --maxfinesdays 30 All item over 30 days late will have the maximal fine applied. Here is a test plan I followed based on above. Test plan: 1. Create circulation rule with Overdue fines cap set 2. Set finesMode systempreference to 'Calculate and charge' 3. Check out an item with the due date set 30 days ago 4. In Koha shell run ./fines.pl --maxfinesdays 30 5. There should now be a new fine in the accountlines table of the amount set in overdue fines cap Followed test plan, patch worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85915|0 |1 is obsolete| | --- Comment #17 from Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> --- Created attachment 85918 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85918&action=edit Bug 19336: (follow-up) Correct DateTime and Koha calls This fixes the 'DateTime does not overload' error. It also fixes the next error, which was that C4::GetIssuingRules is deprecated. Finally it now handles no overduefinescap being define (does nothing). Passes QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85916|0 |1 is obsolete| | --- Comment #18 from Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> --- Created attachment 85919 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85919&action=edit Bug 19336: (QA follow-up) Initialize $unitcounttotal in case a report is written -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85917|0 |1 is obsolete| | --- Comment #19 from Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> --- Created attachment 85920 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85920&action=edit Bug 19336: Add --maxfinesday option to fines.pl This is a functionality we have for some of our clients we want to push to the community. Adds the --maxfinesday argument to fines.pl which creates or updates a fine with the maximum amount set in the circulation rules after the delay has passed. e.g.: ./fines.pl --maxfinesdays 30 All item over 30 days late will have the maximal fine applied. Here is a test plan I followed based on above. Test plan: 1. Create circulation rule with Overdue fines cap set 2. Set finesMode systempreference to 'Calculate and charge' 3. Check out an item with the due date set 30 days ago 4. In Koha shell run ./fines.pl --maxfinesdays 30 5. There should now be a new fine in the accountlines table of the amount set in overdue fines cap Followed test plan, patch worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85918|0 |1 is obsolete| | --- Comment #20 from Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> --- Created attachment 85921 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85921&action=edit Bug 19336: (follow-up) Correct DateTime and Koha calls This fixes the 'DateTime does not overload' error. It also fixes the next error, which was that C4::GetIssuingRules is deprecated. Finally it now handles no overduefinescap being define (does nothing). Passes QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85919|0 |1 is obsolete| | --- Comment #21 from Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> --- Created attachment 85922 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85922&action=edit Bug 19336: (QA follow-up) Initialize $unitcounttotal in case a report is written -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #22 from Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com> --- Created attachment 85923 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85923&action=edit Bug 19336: (follow-up) Initialize $unitcount instead of $unitcounttotal after changes on master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Nadine Pierre <nadine.pierre@InLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nadine.pierre@InLibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Mazen Khallaf <mazen.i.khallaf@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |mazen.i.khallaf@gmail.com --- Comment #23 from Mazen Khallaf <mazen.i.khallaf@gmail.com> --- Couldn't apply the patch $ git bz apply 19336 y Bug 19336 - Add option to fines.pl to apply maximal fine amount after delay 85920 - Bug 19336: Add --maxfinesday option to fines.pl 85921 - Bug 19336: (follow-up) Correct DateTime and Koha calls 85922 - Bug 19336: (QA follow-up) Initialize $unitcounttotal in case a report is written 85923 - Bug 19336: (follow-up) Initialize $unitcount instead of $unitcounttotal after changes on master Apply? [(y)es, (n)o, (i)nteractive] Applying: Bug 19336: Add --maxfinesday option to fines.pl Using index info to reconstruct a base tree... M misc/cronjobs/fines.pl Falling back to patching base and 3-way merge... Auto-merging misc/cronjobs/fines.pl CONFLICT (content): Merge conflict in misc/cronjobs/fines.pl error: Failed to merge in the changes. Patch failed at 0001 Bug 19336: Add --maxfinesday option to fines.pl The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-19336-Add---maxfinesday-option-to-finespl-d37mQ0.patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Alexis Ripetti <alexis.ripetti@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Alexis Ripetti <alexis.ripetti@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85920|0 |1 is obsolete| | --- Comment #24 from Alexis Ripetti <alexis.ripetti@inLibro.com> --- Created attachment 124197 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124197&action=edit Bug 19336: Add --maxfinesday option to fines.pl This is a functionality we have for some of our clients we want to push to the community. Adds the --maxfinesday argument to fines.pl which creates or updates a fine with the maximum amount set in the circulation rules after the delay has passed. e.g.: ./fines.pl --maxfinesdays 30 All item over 30 days late will have the maximal fine applied. Here is a test plan I followed based on above. Test plan: 1. Create circulation rule with Overdue fines cap set 2. Set finesMode systempreference to 'Calculate and charge' 3. Check out an item with the due date set 30 days ago 4. In Koha shell run ./fines.pl --maxfinesdays 30 5. There should now be a new fine in the accountlines table of the amount set in overdue fines cap Followed test plan, patch worked as intended -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Alexis Ripetti <alexis.ripetti@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85921|0 |1 is obsolete| | --- Comment #25 from Alexis Ripetti <alexis.ripetti@inLibro.com> --- Created attachment 124198 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124198&action=edit Bug 19336: (follow-up) Correct DateTime and Koha calls This fixes the 'DateTime does not overload' error. It also fixes the next error, which was that C4::GetIssuingRules is deprecated. Finally it now handles no overduefinescap being define (does nothing). Passes QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Alexis Ripetti <alexis.ripetti@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85922|0 |1 is obsolete| | --- Comment #26 from Alexis Ripetti <alexis.ripetti@inLibro.com> --- Created attachment 124199 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124199&action=edit Bug 19336: (QA follow-up) Initialize $unitcounttotal in case a report is written -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #27 from Alexis Ripetti <alexis.ripetti@inLibro.com> --- Created attachment 124200 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124200&action=edit Bug 19336: (follow-up) Initialize $unitcount instead of $unitcounttotal after changes on master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #28 from Alexis Ripetti <alexis.ripetti@inLibro.com> --- Created attachment 124201 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124201&action=edit Bug 19336: (QA follow-up) Using CirculationRules instead of IssuingRules -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Alexis Ripetti <alexis.ripetti@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexis.ripetti@inLibro.com Attachment #85923|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124197|0 |1 is obsolete| | --- Comment #29 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 153504 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153504&action=edit Bug 19336: Add --maxfinesday option to fines.pl This is a functionality we have for some of our clients we want to push to the community. Adds the --maxfinesday argument to fines.pl which creates or updates a fine with the maximum amount set in the circulation rules after the delay has passed. e.g.: ./fines.pl --maxfinesdays 30 All item over 30 days late will have the maximal fine applied. Here is a test plan I followed based on above. Test plan: 1. Create circulation rule with Overdue fines cap set 2. Set finesMode systempreference to 'Calculate and charge' 3. Check out an item with the due date set 30 days ago 4. In Koha shell run ./fines.pl --maxfinesdays 30 5. There should now be a new fine in the accountlines table of the amount set in overdue fines cap Followed test plan, patch worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124198|0 |1 is obsolete| | --- Comment #30 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 153505 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153505&action=edit Bug 19336: (follow-up) Correct DateTime and Koha calls This fixes the 'DateTime does not overload' error. It also fixes the next error, which was that C4::GetIssuingRules is deprecated. Finally it now handles no overduefinescap being define (does nothing). Passes QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124199|0 |1 is obsolete| | --- Comment #31 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 153506 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153506&action=edit Bug 19336: (QA follow-up) Initialize $unitcounttotal in case a report is written -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124200|0 |1 is obsolete| | --- Comment #32 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 153507 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153507&action=edit Bug 19336: (follow-up) Initialize $unitcount instead of $unitcounttotal after changes on master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124201|0 |1 is obsolete| | --- Comment #33 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 153508 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153508&action=edit Bug 19336: (QA follow-up) Using CirculationRules instead of IssuingRules -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #153504|0 |1 is obsolete| | --- Comment #34 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 168517 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168517&action=edit Bug 19336: Add --maxfinesday option to fines.pl This is a functionality we have for some of our clients we want to push to the community. Adds the --maxfinesday argument to fines.pl which creates or updates a fine with the maximum amount set in the circulation rules after the delay has passed. e.g.: ./fines.pl --maxfinesdays 30 All item over 30 days late will have the maximal fine applied. Here is a test plan I followed based on above. Test plan: 1. Create circulation rule with Overdue fines cap set 2. Set finesMode systempreference to 'Calculate and charge' 3. Check out an item with the due date set 30 days ago 4. In Koha shell run ./fines.pl --maxfinesdays 30 5. There should now be a new fine in the accountlines table of the amount set in overdue fines cap Followed test plan, patch worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #153505|0 |1 is obsolete| | --- Comment #35 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 168518 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168518&action=edit Bug 19336: (follow-up) Correct DateTime and Koha calls This fixes the 'DateTime does not overload' error. It also fixes the next error, which was that C4::GetIssuingRules is deprecated. Finally it now handles no overduefinescap being define (does nothing). Passes QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #153506|0 |1 is obsolete| | --- Comment #36 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 168519 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168519&action=edit Bug 19336: (QA follow-up) Initialize $unitcounttotal in case a report is written Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #153507|0 |1 is obsolete| | --- Comment #37 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 168520 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168520&action=edit Bug 19336: (follow-up) Initialize $unitcount instead of $unitcounttotal after changes on master Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #153508|0 |1 is obsolete| | --- Comment #38 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 168521 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168521&action=edit Bug 19336: (QA follow-up) Using CirculationRules instead of IssuingRules Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |chris@bigballofwax.co.nz -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168517|0 |1 is obsolete| | Attachment #168518|0 |1 is obsolete| | Attachment #168519|0 |1 is obsolete| | Attachment #168520|0 |1 is obsolete| | Attachment #168521|0 |1 is obsolete| | --- Comment #39 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 172982 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172982&action=edit Bug 19336: Add --maxfinesday option to fines.pl This is a functionality we have for some of our clients we want to push to the community. Adds the --maxfinesday argument to fines.pl which creates or updates a fine with the maximum amount set in the circulation rules after the delay has passed. e.g.: ./fines.pl --maxfinesdays 30 All item over 30 days late will have the maximal fine applied. Here is a test plan I followed based on above. Test plan: 1. Create circulation rule with Overdue fines cap set 2. Set finesMode systempreference to 'Calculate and charge' 3. Check out an item with the due date set 30 days ago 4. In Koha shell run ./fines.pl --maxfinesdays 30 5. There should now be a new fine in the accountlines table of the amount set in overdue fines cap Followed test plan, patch worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #40 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 172983 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172983&action=edit Bug 19336: (follow-up) Correct DateTime and Koha calls This fixes the 'DateTime does not overload' error. It also fixes the next error, which was that C4::GetIssuingRules is deprecated. Finally it now handles no overduefinescap being define (does nothing). Passes QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #41 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 172984 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172984&action=edit Bug 19336: (QA follow-up) Initialize $unitcounttotal in case a report is written Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #42 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 172985 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172985&action=edit Bug 19336: (follow-up) Initialize $unitcount instead of $unitcounttotal after changes on master Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #43 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 172986 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172986&action=edit Bug 19336: (QA follow-up) Using CirculationRules instead of IssuingRules Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #44 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 172987 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172987&action=edit Bug 19336: (QA follow-up) Tidy fines.pl Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Signed Off --- Comment #45 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am aware that this has gone through a lot of different hands already. The fines.pl script is quite a sensitive spot. We want to add the new feature, without breaking anything of the old behavior. I tried reviewing the code myself, but it's also not our prettiest script and there is a lot of variables flying around. May I request a second set of QA eyes here please? - my ( $amount, $unitcounttotal, $unitcount ) = - CalcFine( $overdue, $patron->categorycode, - $branchcode, $datedue, $today ); + my ( $amount, $unitcounttotal, $unitcount ); + if ( defined($maxfinesdays) && $maxfinesdays <= $datedue->delta_days($today)->in_units('days') ) { + my $itype = $overdue->{itemtype} || $overdue->{itype}; + my $data = Koha::CirculationRules->get_effective_rule( + { + rule_name => 'overduefinescap', categorycode => $patron->categorycode, itemtype => $itype, + branchcode => $branchcode + } + ); + if ( defined( $data->rule_value ) ) { + $amount = $data->rule_value; + $unitcount = 'n/a'; + } else { + print + "No overduefinescap defined for {branchcode = $branchcode, itemtype = $itype and categorycode = $patron->categorycode}\n"; + } + } + if ( !$amount ) { + ( $amount, $unitcounttotal, $unitcount ) = + CalcFine( $overdue, $patron->categorycode, $branchcode, $datedue, $today ); + } Some things I wondered about: + if ( !$amount ) { Why this added condition on the calculation? To me it looks like that would keep fines from increasing. I had expected an else case that keeps things like before if the new option is not used. + $unitcount = 'n/a'; Why this assignment? Unit count is usually numeric, but now set to a string. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #46 from Katrin Fischer <katrin.fischer@bsz-bw.de> ---
Some things I wondered about:
+ if ( !$amount ) { Why this added condition on the calculation? To me it looks like that would keep fines from increasing. I had expected an else case that keeps things like before if the new option is not used.
OK, sometimes it takes a moment longer, I just realized my mistake: The if makes sense to me now. Amount is not the current fine, but what is calculated within the script as the new fine. if there is already a new fine (maxfinesday was used and calculated), we don't want to change it, but when it wasn't calculated, it should calculate the normal fine. One new question: What about CalculateFinesOnReturn? This changes how fines are calculated in fines.pl, but leaves CalcFine unchanged. So when fines in Koha are recalculated for some reason, like when using CalculateFinesOnReturn, the fine will be reduced or changed to the multipe of fine amount * fine interval eventually. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 William Lavoie <william.lavoie@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172982|0 |1 is obsolete| | --- Comment #47 from William Lavoie <william.lavoie@inLibro.com> --- Created attachment 176915 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176915&action=edit Bug 19336: Add --maxfinesday option to fines.pl This is a functionality we have for some of our clients we want to push to the community. Adds the --maxfinesday argument to fines.pl which creates or updates a fine with the maximum amount set in the circulation rules after the delay has passed. e.g.: ./fines.pl --maxfinesdays 30 All item over 30 days late will have the maximal fine applied. Here is a test plan I followed based on above. Test plan: 1. Create circulation rule with Overdue fines cap set 2. Set finesMode systempreference to 'Calculate and charge' 3. Check out an item with the due date set 30 days ago 4. In Koha shell run ./fines.pl --maxfinesdays 30 5. There should now be a new fine in the accountlines table of the amount set in overdue fines cap Followed test plan, patch worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 William Lavoie <william.lavoie@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172983|0 |1 is obsolete| | --- Comment #48 from William Lavoie <william.lavoie@inLibro.com> --- Created attachment 176916 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176916&action=edit Bug 19336: (follow-up) Correct DateTime and Koha calls This fixes the 'DateTime does not overload' error. It also fixes the next error, which was that C4::GetIssuingRules is deprecated. Finally it now handles no overduefinescap being define (does nothing). Passes QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 William Lavoie <william.lavoie@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172984|0 |1 is obsolete| | --- Comment #49 from William Lavoie <william.lavoie@inLibro.com> --- Created attachment 176917 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176917&action=edit Bug 19336: (QA follow-up) Initialize $unitcounttotal in case a report is written Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 William Lavoie <william.lavoie@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172985|0 |1 is obsolete| | --- Comment #50 from William Lavoie <william.lavoie@inLibro.com> --- Created attachment 176918 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176918&action=edit Bug 19336: (follow-up) Initialize $unitcount instead of $unitcounttotal after changes on master Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 William Lavoie <william.lavoie@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172986|0 |1 is obsolete| | --- Comment #51 from William Lavoie <william.lavoie@inLibro.com> --- Created attachment 176919 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176919&action=edit Bug 19336: (QA follow-up) Using CirculationRules instead of IssuingRules Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 William Lavoie <william.lavoie@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172987|0 |1 is obsolete| | --- Comment #52 from William Lavoie <william.lavoie@inLibro.com> --- Created attachment 176920 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176920&action=edit Bug 19336: (QA follow-up) Tidy fines.pl Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 William Lavoie <william.lavoie@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff CC| |william.lavoie@inLibro.com --- Comment #53 from William Lavoie <william.lavoie@inLibro.com> --- Rebased -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 William Lavoie <william.lavoie@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176915|0 |1 is obsolete| | --- Comment #54 from William Lavoie <william.lavoie@inLibro.com> --- Created attachment 178427 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178427&action=edit Bug 19336: Add --maxfinesday option to fines.pl This is a functionality we have for some of our clients we want to push to the community. Adds the --maxfinesday argument to fines.pl which creates or updates a fine with the maximum amount set in the circulation rules after the delay has passed. e.g.: ./fines.pl --maxfinesdays 30 All item over 30 days late will have the maximal fine applied. Here is a test plan I followed based on above. Test plan: 1. Create circulation rule with Overdue fines cap set 2. Set finesMode systempreference to 'Calculate and charge' 3. Check out an item with the due date set 30 days ago 4. In Koha shell run ./fines.pl --maxfinesdays 30 5. There should now be a new fine in the accountlines table of the amount set in overdue fines cap Followed test plan, patch worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 William Lavoie <william.lavoie@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176916|0 |1 is obsolete| | --- Comment #55 from William Lavoie <william.lavoie@inLibro.com> --- Created attachment 178428 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178428&action=edit Bug 19336: (follow-up) Correct DateTime and Koha calls This fixes the 'DateTime does not overload' error. It also fixes the next error, which was that C4::GetIssuingRules is deprecated. Finally it now handles no overduefinescap being define (does nothing). Passes QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 William Lavoie <william.lavoie@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176917|0 |1 is obsolete| | --- Comment #56 from William Lavoie <william.lavoie@inLibro.com> --- Created attachment 178429 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178429&action=edit Bug 19336: (QA follow-up) Initialize $unitcounttotal in case a report is written Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 William Lavoie <william.lavoie@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176918|0 |1 is obsolete| | --- Comment #57 from William Lavoie <william.lavoie@inLibro.com> --- Created attachment 178430 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178430&action=edit Bug 19336: (follow-up) Initialize $unitcount instead of $unitcounttotal after changes on master Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 William Lavoie <william.lavoie@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176919|0 |1 is obsolete| | --- Comment #58 from William Lavoie <william.lavoie@inLibro.com> --- Created attachment 178431 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178431&action=edit Bug 19336: (QA follow-up) Using CirculationRules instead of IssuingRules Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 William Lavoie <william.lavoie@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176920|0 |1 is obsolete| | --- Comment #59 from William Lavoie <william.lavoie@inLibro.com> --- Created attachment 178432 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178432&action=edit Bug 19336: (QA follow-up) Tidy fines.pl Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #60 from William Lavoie <william.lavoie@inLibro.com> --- This needed another rebase. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com Assignee|charles.farmer@inlibro.com |william.lavoie@inLibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|alexis.ripetti@inLibro.com, | |charles.farmer@inlibro.com, | |nadine.pierre@InLibro.com, | |william.lavoie@inLibro.com | Assignee|william.lavoie@inLibro.com |hammat.wele@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #61 from Chris Cormack <chris@bigballofwax.co.nz> --- Automatic patch test results: â ï¸ The patch applies with fuzzy option (ignoring whitespace). This may indicate minor conflicts that need to be resolved. Details: Patch applies with fuzzy option (ignoring whitespace) This is an automated message from the patch testing system. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178432|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178427|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178428|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178429|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178430|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178431|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #62 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 196524 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196524&action=edit Bug 19336: Add --maxfinesday option to fines.pl This is a functionality we have for some of our clients we want to push to the community. Adds the --maxfinesday argument to fines.pl which creates or updates a fine with the maximum amount set in the circulation rules after the delay has passed. e.g.: ./fines.pl --maxfinesdays 30 All item over 30 days late will have the maximal fine applied. Here is a test plan I followed based on above. Test plan: 1. Create circulation rule with Overdue fines cap set 2. Set finesMode systempreference to 'Calculate and charge' 3. Check out an item with the due date set 30 days ago 4. In Koha shell run ./fines.pl --maxfinesdays 30 5. There should now be a new fine in the accountlines table of the amount set in overdue fines cap Followed test plan, patch worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #63 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 196525 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196525&action=edit Bug 19336: (follow-up) Correct DateTime and Koha calls This fixes the 'DateTime does not overload' error. It also fixes the next error, which was that C4::GetIssuingRules is deprecated. Finally it now handles no overduefinescap being define (does nothing). Passes QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #64 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 196526 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196526&action=edit Bug 19336: (QA follow-up) Initialize $unitcounttotal in case a report is written Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #65 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 196527 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196527&action=edit Bug 19336: (follow-up) Initialize $unitcount instead of $unitcounttotal after changes on master Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #66 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 196528 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196528&action=edit Bug 19336: (QA follow-up) Using CirculationRules instead of IssuingRules Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19336 --- Comment #67 from Hammat wele <hammat.wele@inlibro.com> --- (In reply to Chris Cormack from comment #61)
Automatic patch test results:
â ï¸ The patch applies with fuzzy option (ignoring whitespace). This may indicate minor conflicts that need to be resolved.
Details: Patch applies with fuzzy option (ignoring whitespace)
This is an automated message from the patch testing system.
I’ve updated the patch to fix the fuzzy application issue (whitespace conflicts). It should now apply cleanly. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org