[Bug 14390] New: On renewal, the last fine is not marked as accounttype 'F' when item is checked in.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 Bug ID: 14390 Summary: On renewal, the last fine is not marked as accounttype 'F' when item is checked in. Change sponsored?: --- Product: Koha Version: 3.18 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: barton@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com When an item with a fine is renewed, the old fine is closed (i.e. accounttype is set to 'F'). A new fine is created, with an updated description. The new find is not closed when the item is checked back in. select date, amount, description, accounttype, amountoutstanding, lastincrement, timestamp from accountlines where itemnumber = 35540 and borrowernumber = 24990\G *************************** 1. row *************************** date: 2015-05-05 amount: 0.500000 description: O'Connor's annotated criminal codes plus. 05/04/2015 11:59 PM accounttype: F amountoutstanding: 0.500000 lastincrement: 0.500000 timestamp: 2015-06-08 12:42:27 *************************** 2. row *************************** date: 2015-06-08 amount: 4.500000 description: O'Connor's annotated criminal codes plus. 05/26/2015 11:59 PM accounttype: FU amountoutstanding: 4.500000 lastincrement: 0.500000 timestamp: 2015-06-08 02:02:40 2 rows in set (0.00 sec) Looking in old_issues, you can see that the item was renewed, and that date_due does match the second description... only the first accountlines entry is marked woth accounttype 'F' on return, however. select date_due, returndate, lastreneweddate, renewals, timestamp, issuedate from old_issues where itemnumber = 35540 and borrowernumber = 24990\G *************************** 1. row *************************** date_due: 2015-05-26 23:59:00 returndate: 2015-06-08 12:42:27 lastreneweddate: 2015-05-05 00:00:00 renewals: 1 timestamp: 2015-06-08 12:42:27 issuedate: 2015-04-13 09:23:20 To replicate: 1) check out an item 2) let the item go overdue and start accruing fines 3) renew the item 4) let the item go overdue again. Note that a second accountlines entry has been added 5) return the item. Note that the new fine is set with accounttype 'FU'. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14380 Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | --- Comment #1 from Barton Chittenden <barton@bywatersolutions.com> --- Assigning to Kyle Hall, per discussion with him. Kyle, please note Katrin's comments in the previous ticket: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14380#c3 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 --- Comment #2 from Galen Charlton <gmcharlt@gmail.com> --- I don't think that renewing a loan actually converts accrued overdue fines to committed/closed ones. Rather, I think the sequence of events is this: - make loan - loan becomes overdue - accrued fines start getting calculated (accounttype = FU) - loan is renewed - accrued fine record is not changed (and while the fine itself shouldn't go away, the accounttype *ought* to be changed to F and the description updated to indicate that the loan was renewed while overdue) - loan becomes overdue again - accrued fines start getting calculated on a second accountlines row - loan gets returned During the return processing, _FixOverduesOnReturn will change the accounttype of accrued fines from FU to F. However, it currently assumes that there is exactly one such fine; if there are multiple ones, only one gets its accounttype changed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 bondiurbano <costalc@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |costalc@gmail.com --- Comment #3 from bondiurbano <costalc@gmail.com> --- Kyle, Galen I think it is a "major" bug... Today I will attach the test I've done. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 --- Comment #4 from bondiurbano <costalc@gmail.com> --- Created attachment 41428 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41428&action=edit Step by step sample Sorry, in spanish -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 --- Comment #5 from bondiurbano <costalc@gmail.com> --- (In reply to Galen Charlton from comment #2)
I don't think that renewing a loan actually converts accrued overdue fines to committed/closed ones. Rather, I think the sequence of events is this:
- make loan - loan becomes overdue - accrued fines start getting calculated (accounttype = FU) - loan is renewed - accrued fine record is not changed (and while the fine itself shouldn't go away, the accounttype *ought* to be changed to F and the description updated to indicate that the loan was renewed while overdue) - loan becomes overdue again - accrued fines start getting calculated on a second accountlines row - loan gets returned
During the return processing, _FixOverduesOnReturn will change the accounttype of accrued fines from FU to F. However, it currently assumes that there is exactly one such fine; if there are multiple ones, only one gets its accounttype changed.
Fully agree with you. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |elliott@bywatersolutions.co | |m --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- *** Bug 9614 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 44600 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44600&action=edit Bug 14390 - On renewal, the last fine is not marked as accounttype 'F' when item is checked in. Test Plan: 1) Find an overdue checkout with a fine 2) Renew item, note fine is not closed out (Account type F) 3) Apply this patch 4) Find another overdue checkout with a fine 5) Renew item, note fine is now correctly closed out 6) Backdate a checkout to be already overdue ( but not have a fine since fines.pl hasn't run yet ) 7) Renew item, note a closed out fine is created -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 --- Comment #8 from bondiurbano <costalc@gmail.com> --- (In reply to Galen Charlton from comment #2)
I don't think that renewing a loan actually converts accrued overdue fines to committed/closed ones. Rather, I think the sequence of events is this:
- make loan - loan becomes overdue - accrued fines start getting calculated (accounttype = FU) - loan is renewed - accrued fine record is not changed (and while the fine itself shouldn't go away, the accounttype *ought* to be changed to F and the description updated to indicate that the loan was renewed while overdue) - loan becomes overdue again - accrued fines start getting calculated on a second accountlines row - loan gets returned
During the return processing, _FixOverduesOnReturn will change the accounttype of accrued fines from FU to F. However, it currently assumes that there is exactly one such fine; if there are multiple ones, only one gets its accounttype changed.
Galen, It seems that the problem described by you in the last paragraph of comment 2 is not fixed in this ticket. Do you think it would be appropriate to open a new ticket to address this problem? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 Kyle M Hall <kyle@bywatersolutions.com> 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=14390 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44600|0 |1 is obsolete| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 44603 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44603&action=edit Bug 14390 - On renewal, the last fine is not marked as accounttype 'F' when item is checked in. Test Plan: 1) Find an overdue checkout with a fine 2) Renew item, note fine is not closed out (Account type F) 3) Apply this patch 4) Find another overdue checkout with a fine 5) Renew item, note fine is now correctly closed out 6) Backdate a checkout to be already overdue ( but not have a fine since fines.pl hasn't run yet ) 7) Renew item, note a closed out fine is created Signed-off-by: Sean Minkel <sminkel@rcplib.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 --- Comment #10 from bondiurbano <costalc@gmail.com> --- (In reply to Galen Charlton from comment #2)
I don't think that renewing a loan actually converts accrued overdue fines to committed/closed ones. Rather, I think the sequence of events is this:
- make loan - loan becomes overdue - accrued fines start getting calculated (accounttype = FU) - loan is renewed - accrued fine record is not changed (and while the fine itself shouldn't go away, the accounttype *ought* to be changed to F and the description updated to indicate that the loan was renewed while overdue) - loan becomes overdue again - accrued fines start getting calculated on a second accountlines row - loan gets returned
During the return processing, _FixOverduesOnReturn will change the accounttype of accrued fines from FU to F. However, it currently assumes that there is exactly one such fine; if there are multiple ones, only one gets its accounttype changed.
Galen, I will think this problem all over again. May be it works. Sorry. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Does it affect 3.18.x only? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 --- Comment #12 from bondiurbano <costalc@gmail.com> --- Same problem in 3.20.04 and 3.20.05 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.18 |master CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Kyle and all, 1) some problem noted by the QA script: FAIL C4/Circulation.pm OK critic OK forbidden patterns OK pod OK spelling FAIL valid "my" variable $borrower masks earlier declaration in same scope 2) Also: can you please shorten the bug title a bit and explain what the consequence of the fine not changed is in the commit message? 3) I'd really like to see a regression test highlighting the changed behaviour. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|On renewal, the last fine |Fine not updated from 'FU' |is not marked as |to 'F' on renewal |accounttype 'F' when item | |is checked in. | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44603|0 |1 is obsolete| | --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 45280 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45280&action=edit Bug 14390 [QA Followup] - Unit Test -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 --- Comment #15 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 45281 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45281&action=edit Bug 14390 - Fine not updated from 'FU' to 'F' on renewal Test Plan: 1) Find an overdue checkout with a fine 2) Renew item, note fine is not closed out (Account type F) 3) Apply this patch 4) Find another overdue checkout with a fine 5) Renew item, note fine is now correctly closed out 6) Backdate a checkout to be already overdue ( but not have a fine since fines.pl hasn't run yet ) 7) Renew item, note a closed out fine is created Signed-off-by: Sean Minkel <sminkel@rcplib.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> ---
1) some problem noted by the QA script:
FAIL C4/Circulation.pm OK critic OK forbidden patterns OK pod OK spelling FAIL valid "my" variable $borrower masks earlier declaration in same scope
I cannot reproduce this qa bark. perl -c also doesn't give me any warnings.
2) Also: can you please shorten the bug title a bit and explain what the consequence of the fine not changed is in the commit message?
Done! There is little consequence to the bug except that lots of closed out fines appear to be accruing from a librarian's perspective.
3) I'd really like to see a regression test highlighting the changed behaviour.
Done! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Kyle M Hall from comment #16)
1) some problem noted by the QA script:
FAIL C4/Circulation.pm OK critic OK forbidden patterns OK pod OK spelling FAIL valid "my" variable $borrower masks earlier declaration in same scope
I cannot reproduce this qa bark. perl -c also doesn't give me any warnings.
perl -w will give you the warnings. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 --- Comment #18 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 45285 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45285&action=edit Bug 14390 [QA Followup] - Fix warning -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 --- Comment #19 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #17)
(In reply to Kyle M Hall from comment #16)
1) some problem noted by the QA script:
FAIL C4/Circulation.pm OK critic OK forbidden patterns OK pod OK spelling FAIL valid "my" variable $borrower masks earlier declaration in same scope
I cannot reproduce this qa bark. perl -c also doesn't give me any warnings.
perl -w will give you the warnings.
Thanks! Still not sure why koha-qa.pl didn't tell me that. Most odd. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 Tom Misilo <misilot@fit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |misilot@fit.edu -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, I might have found a case where this doesn't work quite right: Apply patch. Follow test plan: - Make sure there is an overdue item with a fine. - Renew overdue item with due date A. - Observe that fine type changes from FU to F. - Check out the item again - with a different due date B. - Run fines again. - Observe that fine is now F - although it should still be accrueing and FU. Kyle, can you please check? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 --- Comment #21 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- ... I should add that switching back to master and repeating the process with a third due date C closer to today, the new fine added is FU. So there seems to be a difference from this patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #22 from Kyle M Hall <kyle@bywatersolutions.com> --- I was unable to reproduce: http://screencast.com/t/LRtwBd6ax -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 --- Comment #23 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I will retest -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 --- Comment #24 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #23)
I will retest
Thanks! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org