Description
Francois Charbonnier
2014-08-15 13:15:07 UTC
This patch will include the work on Bug 12771. Created attachment 41477 [details] [review] Bug 12772 - Update Database (Based on Bug13624) This patch applies to Bug13624. Removes letter number from overduerules and overdurules_transport_types modified: installer/data/mysql/atomicupdate/update_13624_overduerules_transport_type.pl modified: installer/data/mysql/kohastructure.sql Created attachment 41478 [details] [review] Bug 12772 - Overdue rules tool and backend library modified: C4/Overdues.pm modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt modified: tools/overduerules.pl Created attachment 41479 [details] [review] Bug 12772 - Reworked overdue_notices.pl script modified: misc/cronjobs/overdue_notices.pl Created attachment 41480 [details] [review] Bug 12772 - Renames atomic update file, .pl -> .perl renamed: update_13624_overduerules_transport_type.pl -> update_13624_overduerules_transport_type.perl Test plan Apply patches (Bugs 13624 and 12772) Run updatedatabase.pl Add rules in Tools > Overdue notice/status triggers Change checked out items due date to match the rules defined above Run the overdue_notices.pl script (in /misc/cronjobs) You should receive emails corresponding to your overdue rules Since we had to rewrite part of the overdue_notices.pl script, I put together all the information you'll need to understand what changes with this new script here : http://wiki.koha-community.org/wiki/Overdue_Notice_Enhancement#Complete_Overdue_notices.pl_test_plan Also, I put all the test cases I used here : http://wiki.koha-community.org/wiki/Overdue_Notice_Enhancement#Complete_Overdue_notices.pl_test_plan The first link is wrong. The changings in the script is here : http://wiki.koha-community.org/wiki/Overdue_Notice_Enhancement#Changings_in_the_overdue_notices.pl_script Created attachment 41855 [details] [review] Bug 12772 - Fix warnings This commit fixes a bunch of warnings for verbose messages which would clutter up the output. They should not affect normal excution. Sponsored-By: Halland County Library I have done basic testing with this and it seems to work for simple cases at least. I plan to work throught the test plan before I sign off on it. Created attachment 42126 [details] [review] Bug 12772 - Fix rule updates Overduerules ID was not sent correctly when editing rules, resulting in rule being cleared instead of updated. This patch fixes this issue, and a couple of uninitilized values as a bonus. Created attachment 45184 [details] [review] Bug 12772: tmp commit rename db updatefile back to .pl for 12772 The file needs to be renamed so that the next patch can go through. Created attachment 45185 [details] [review] Bug 12772 - Update Database (Based on Bug13624) This patch applies to Bug13624. Removes letter number from overduerules and overdurules_transport_types modified: installer/data/mysql/atomicupdate/update_13624_overduerules_transport_type.pl modified: installer/data/mysql/kohastructure.sql Created attachment 45186 [details] [review] Bug 12772 - Overdue rules tool and backend library modified: C4/Overdues.pm modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt modified: tools/overduerules.pl Created attachment 45187 [details] [review] Bug 12772 - Reworked overdue_notices.pl script modified: misc/cronjobs/overdue_notices.pl Created attachment 45188 [details] [review] Bug 12772 - Renames atomic update file, .pl -> .perl renamed: update_13624_overduerules_transport_type.pl -> update_13624_overduerules_transport_type.perl Created attachment 45189 [details] [review] Bug 12772 - Fix warnings This commit fixes a bunch of warnings for verbose messages which would clutter up the output. They should not affect normal excution. Sponsored-By: Halland County Library Created attachment 45190 [details] [review] Bug 12772 - Fix rule updates Overduerules ID was not sent correctly when editing rules, resulting in rule being cleared instead of updated. This patch fixes this issue, and a couple of uninitilized values as a bonus. Created attachment 45191 [details] [review] Bug 12772 - Update Database (Based on Bug13624) This patch applies to Bug13624. Removes letter number from overduerules and overdurules_transport_types modified: installer/data/mysql/atomicupdate/update_13624_overduerules_transport_type.pl modified: installer/data/mysql/kohastructure.sql Created attachment 45192 [details] [review] Bug 12772 - Overdue rules tool and backend library modified: C4/Overdues.pm modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt modified: tools/overduerules.pl Created attachment 45193 [details] [review] Bug 12772 - Reworked overdue_notices.pl script modified: misc/cronjobs/overdue_notices.pl Created attachment 45194 [details] [review] Bug 12772 - Renames atomic update file, .pl -> .perl renamed: update_13624_overduerules_transport_type.pl -> update_13624_overduerules_transport_type.perl Created attachment 45195 [details] [review] Bug 12772 - Fix warnings This commit fixes a bunch of warnings for verbose messages which would clutter up the output. They should not affect normal excution. Sponsored-By: Halland County Library Created attachment 45196 [details] [review] Bug 12772 - Fix rule updates Overduerules ID was not sent correctly when editing rules, resulting in rule being cleared instead of updated. This patch fixes this issue, and a couple of uninitilized values as a bonus. Created attachment 45197 [details] [review] Bug 12772: Add back file so next patch does not fail This file is needed so that Update Database (Based in Bug13624) can succeed. Created attachment 45198 [details] [review] Bug 12772: Add back file so next patch does not fail Created attachment 45199 [details] [review] Bug 12772 - Update Database (Based on Bug13624) This patch applies to Bug13624. Removes letter number from overduerules and overdurules_transport_types modified: installer/data/mysql/atomicupdate/update_13624_overduerules_transport_type.pl modified: installer/data/mysql/kohastructure.sql Created attachment 45200 [details] [review] Bug 12772 - Overdue rules tool and backend library modified: C4/Overdues.pm modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt modified: tools/overduerules.pl Created attachment 45201 [details] [review] Bug 12772 - Reworked overdue_notices.pl script modified: misc/cronjobs/overdue_notices.pl Created attachment 45202 [details] [review] Bug 12772 - Renames atomic update file, .pl -> .perl renamed: update_13624_overduerules_transport_type.pl -> update_13624_overduerules_transport_type.perl Created attachment 45203 [details] [review] Bug 12772 - Fix warnings This commit fixes a bunch of warnings for verbose messages which would clutter up the output. They should not affect normal excution. Sponsored-By: Halland County Library Created attachment 45204 [details] [review] Bug 12772 - Fix rule updates Overduerules ID was not sent correctly when editing rules, resulting in rule being cleared instead of updated. This patch fixes this issue, and a couple of uninitilized values as a bonus. Sorry for the clutter of updates. This was a bit of a tricky rebase but the patch now applies again. Remember that applying 13624 is a prereq for applying this patch. I see merge conflict markers in the first patch. (In reply to Kyle M Hall from comment #34) > I see merge conflict markers in the first patch. Make that the second patch. Created attachment 45544 [details] [review] Remove merge conflict markers http://bugs.koha-community.org/show_bug.cgi?id=1277 Created attachment 45545 [details] [review] Bug 12772 - Update Database (Based on Bug13624) This patch applies to Bug13624. Removes letter number from overduerules and overdurules_transport_types modified: installer/data/mysql/atomicupdate/update_13624_overduerules_transport_type.pl modified: installer/data/mysql/kohastructure.sql Remove merge conflict markers Created attachment 45546 [details] [review] Bug 12772: Add back file so next patch does not fail Created attachment 45547 [details] [review] Bug 12772 - Update Database (Based on Bug13624) This patch applies to Bug13624. Removes letter number from overduerules and overdurules_transport_types modified: installer/data/mysql/atomicupdate/update_13624_overduerules_transport_type.pl modified: installer/data/mysql/kohastructure.sql Remove merge conflict markers Created attachment 45548 [details] [review] Bug 12772 - Overdue rules tool and backend library modified: C4/Overdues.pm modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt modified: tools/overduerules.pl Created attachment 45549 [details] [review] Bug 12772 - Reworked overdue_notices.pl script modified: misc/cronjobs/overdue_notices.pl Created attachment 45550 [details] [review] Bug 12772 - Renames atomic update file, .pl -> .perl renamed: update_13624_overduerules_transport_type.pl -> update_13624_overduerules_transport_type.perl Created attachment 45551 [details] [review] Bug 12772 - Fix warnings This commit fixes a bunch of warnings for verbose messages which would clutter up the output. They should not affect normal excution. Sponsored-By: Halland County Library Created attachment 45552 [details] [review] Bug 12772 - Fix rule updates Overduerules ID was not sent correctly when editing rules, resulting in rule being cleared instead of updated. This patch fixes this issue, and a couple of uninitilized values as a bonus. I have fixed so that this patch can be applied to current master again and removed the merge conflict markers. 13624 that this patch depends on was pushed to master but introduced a bug tracked in 16007. Possible new dependency. Testing this now Ok, this won't apply in its current form. The bugs it depends on have been pushed, but this is written to modify the sql of them. We can't do that, peoples databases will already have been upgraded. So we need a new atomic script to just make the changes that are needed now the other changes have been made. I will work on that Created attachment 56063 [details] [review] Bug 12772 : Update kohastructure.sql And add atomic update To rejig the overduerules table so more than 3 types of notices can be sent Also removes the letternumber column from overduerules_transport_types This patch will break the system until the others are applied Created attachment 56077 [details] [review] Bug 12772 - Overdue rules tool and backend library modified: C4/Overdues.pm modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt modified: tools/overduerules.pl Note I had to do a lot of work to get this to apply. It won't work fully until the following patches are done. But attaching now so that we dont lose history of who wrote. Working on a follow up now I wonder how hard it would be to revive this? Has it been too long for the effort so far to still be applicable? Unfortunately, the overdues code has changed a fair bit since this was written and the bug wasn't maintained.. I just tried to apply it and there's a lot to unpick. We're looking to add item-type support to the overdue triggers in bug 10190 ourselves. I'll try to unpick what's here and see how much we can rescue and re-use over there. |