http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8253 wajasu <matted-34813@mypacks.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12685|0 |1 is obsolete| | --- Comment #27 from wajasu <matted-34813@mypacks.net> --- Created attachment 12686 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12686&action=edit SIGNED-OFF-Bug-8253-fix-fine-doubling-when-upgrading from 3.6 to 3.8 - Add de-duplication script Forget about my wanting to split this into another bug. I was tired after testing the first one. After testing the fine-doubling patch, I had entries in accountlines without dupes. I used mysql to return the dupes by removing the ' 23:59' from the descriptions of a couple of entries. select * from accountlines; update accountlines set description='The Hobbit and philosophy : 10/01/2012' where accountno= (where i matched the accountno accordingly and set the dscription to be consistent) select * from accountlines; ./misc/cronjobs/fines.pl select * from accountlines; I see DUPS now. applied the "fix fine doubling - when upgrading..." script ./misc/maintenance/fix_accountlines_rmdupfines_bug8253.pl select * from accountlines; NO DUPES!!! TEST passed. ------- I actually did more: - i created an entry with 'F' as well in accounttype and tested that. - i created dupes, and made the original entries have a lower amountoutstanding, to see if the script preserved that use case, and it did. - observation: repeated runs of fines.pl doesn't create more dups for me. Duplicate fines would happen if you upgraded to a 3.8 version that does not have the bug8253 patch, and the misc/cronjobs/fines.pl is run. In 3.8 an upgrade to a more granular date/time was not addressed for pre-existing fine entries and this script removes the resulting duplicates. It also intelligently preserves the amount outstanding for payments already applied. If your version already had the bug8253 patch at the time of the upgrade, duplicate fines should not have been generatd. Thanks khall for this fix! wajasu Note: I tested khalls prior obsolete script itself (attachment 12665), which worked as well, and this patch includes it as a formalized maintenance script. -- You are receiving this mail because: You are watching all bug changes.