Customisable notices must be triggered to tell patrons if the items were renewed and when failed to renew.
Created attachment 47470 [details] [review] Bug 15705: Notify the user on auto renewing When an issue is auto renewed, a notice will be sent to the patron. The notice will tell if the renewed has been successfully done. Note that this patch is not ready to be pushed yet, as it has some defects: - 1 notice per issue - no way to disable the notice generation - no way to specify patron categories to enable/disable the notifications Test plan: Use the automatic_renewals.pl script to auto renew issues. If the auto renew has failed or succeeded, a notice will be generated in the message_queue table. If the error is "too_soon" or is the same as the previous error, the notice won't be generated (we do not want to spam the patron).
Created attachment 47471 [details] [review] Bug 15705: DB Changes - Add [old_]issues.auto_renew_error and the AUTO_RENEWALS notice
Created attachment 47472 [details] [review] Bug 15705: [DO NOT PUSH] DBIC Schema
Sponsored-by: University of the Arts London
Created attachment 50336 [details] [review] Bug 15705: Notify the user on auto renewing When an issue is auto renewed, a notice will be sent to the patron. The notice will tell if the renewed has been successfully done. Note that this patch is not ready to be pushed yet, as it has some defects: - 1 notice per issue - no way to disable the notice generation - no way to specify patron categories to enable/disable the notifications Test plan: Use the automatic_renewals.pl script to auto renew issues. If the auto renew has failed or succeeded, a notice will be generated in the message_queue table. If the error is "too_soon" or is the same as the previous error, the notice won't be generated (we do not want to spam the patron).
Created attachment 50337 [details] [review] Bug 15705: DB Changes - Add [old_]issues.auto_renew_error and the AUTO_RENEWALS notice
Created attachment 50338 [details] [review] Bug 15705: [DO NOT PUSH] DBIC Schema
Patches have been rebased.
Created attachment 50341 [details] [review] Bug 15705: DB Changes - Add [old_]issues.auto_renew_error and the AUTO_RENEWALS notice
Created attachment 50342 [details] [review] Bug 15705: [DO NOT PUSH] DBIC Schema
Created attachment 50344 [details] [review] Bug 15705: Notify the user on auto renewing When an issue is auto renewed, a notice will be sent to the patron. The notice will tell if the renewed has been successfully done. Note that this patch is not ready to be pushed yet, as it has some defects: - 1 notice per issue - no way to disable the notice generation - no way to specify patron categories to enable/disable the notifications Test plan: Use the automatic_renewals.pl script to auto renew issues. If the auto renew has failed or succeeded, a notice will be generated in the message_queue table. If the error is "too_soon" or is the same as the previous error, the notice won't be generated (we do not want to spam the patron).
Created attachment 50345 [details] [review] Bug 15705: DB Changes - Add [old_]issues.auto_renew_error and the AUTO_RENEWALS notice
Created attachment 50346 [details] [review] Bug 15705: Add is_tt param to the new letter
Created attachment 50680 [details] [review] Bug 15705: [DO NOT PUSH] DBIC Schema
Created attachment 50681 [details] [review] Bug 15705: Notify the user on auto renewing When an issue is auto renewed, a notice will be sent to the patron. The notice will tell if the renewed has been successfully done. Note that this patch is not ready to be pushed yet, as it has some defects: - 1 notice per issue - no way to disable the notice generation - no way to specify patron categories to enable/disable the notifications Test plan: Use the automatic_renewals.pl script to auto renew issues. If the auto renew has failed or succeeded, a notice will be generated in the message_queue table. If the error is "too_soon" or is the same as the previous error, the notice won't be generated (we do not want to spam the patron).
Created attachment 50682 [details] [review] Bug 15705: DB Changes - Add [old_]issues.auto_renew_error and the AUTO_RENEWALS notice
Created attachment 50683 [details] [review] Bug 15705: Add is_tt param to the new letter
Created attachment 50732 [details] [review] Bug 15705: [DO NOT PUSH] DBIC Schema
Created attachment 50733 [details] [review] Bug 15705: DB Changes - Add [old_]issues.auto_renew_error and the AUTO_RENEWALS notice
We tested this patch twice on the ptfs-europe sandbox 2 and we received the following error: The sandbox you've requested is not ready. Some problems occurred applying patches from bug 15705: <h1>Something went wrong !</h1>Applying: Bug 15705: Notify the user on auto renewing Applying: Bug 15705: Add is_tt param to the new letter fatal: sha1 information is lacking or useless (installer/data/mysql/atomicupdate/bug_XXXXX.sql). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 15705: Add is_tt param to the new letter 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. Bug 15705 - Notify the user on auto renewing 50681 - Bug 15705: Notify the user on auto renewing 50683 - Bug 15705: Add is_tt param to the new letter 50732 - Bug 15705: [DO NOT PUSH] DBIC Schema 50733 - Bug 15705: DB Changes - Add [old_]issues.auto_renew_error and the AUTO_RENEWALS notice Apply? [(y)es, (n)o, (i)nteractive] Patch left in /tmp/Bug-15705-Add-istt-param-to-the-new-letter-rBphBw.patch .
(In reply to Sofia Zapounidou from comment #20) > We tested this patch twice on the ptfs-europe sandbox 2 and we received the > following error: > The sandbox you've requested is not ready. This patch depends on 3 other bug reports, did you apply them before?
No I did not. I did not understand this from the test plan.
Created attachment 56756 [details] [review] Bug 15705: Notify the user on auto renewing When an issue is auto renewed, a notice will be sent to the patron. The notice will tell if the renewed has been successfully done. Note that this patch is not ready to be pushed yet, as it has some defects: - 1 notice per issue - no way to disable the notice generation - no way to specify patron categories to enable/disable the notifications Test plan: Use the automatic_renewals.pl script to auto renew issues. If the auto renew has failed or succeeded, a notice will be generated in the message_queue table. If the error is "too_soon" or is the same as the previous error, the notice won't be generated (we do not want to spam the patron).
Created attachment 56757 [details] [review] Bug 15705: DB Changes - Add [old_]issues.auto_renew_error and the AUTO_RENEWALS notice
Created attachment 56758 [details] [review] Bug 15705: Add is_tt param to the new letter
Created attachment 56759 [details] [review] Bug 15705: Add specific warning messages for auto_too_much_oweing
Created attachment 56760 [details] [review] Bug 15705: [DO NOT PUSH] DBIC Schema
Created attachment 56798 [details] [review] Bug 15705: Increasing size of auto_renew_error to 32 auto_too_much_oweing is bigger than 16, so we need more!
Created attachment 56799 [details] [review] Bug 15705: DO NOT PUSH DBIC Changes
Created attachment 56981 [details] [review] Bug 15705: Add specific warning messages for auto_too_much_oweing
Created attachment 56983 [details] [review] Bug 15705: Add specific warning messages for auto_too_much_oweing
Created attachment 57741 [details] [review] Bug 15705: Notify the user on auto renewing When an issue is auto renewed, a notice will be sent to the patron. The notice will tell if the renewed has been successfully done. Note that this patch is not ready to be pushed yet, as it has some defects: - 1 notice per issue - no way to disable the notice generation - no way to specify patron categories to enable/disable the notifications Test plan: Use the automatic_renewals.pl script to auto renew issues. If the auto renew has failed or succeeded, a notice will be generated in the message_queue table. If the error is "too_soon" or is the same as the previous error, the notice won't be generated (we do not want to spam the patron).
Created attachment 57742 [details] [review] Bug 15705: DB Changes - Add [old_]issues.auto_renew_error and the AUTO_RENEWALS notice
Created attachment 57743 [details] [review] Bug 15705: Add is_tt param to the new letter
Created attachment 57744 [details] [review] Bug 15705: [DO NOT PUSH] DBIC Schema
Created attachment 57745 [details] [review] Bug 15705: Increasing size of auto_renew_error to 32 auto_too_much_oweing is bigger than 16, so we need more!
Created attachment 57746 [details] [review] Bug 15705: DO NOT PUSH DBIC Changes
Created attachment 57747 [details] [review] Bug 15705: Add specific warning messages for auto_too_much_oweing
Created attachment 61080 [details] [review] Bug 15705: Notify the user on auto renewing When an issue is auto renewed, a notice will be sent to the patron. The notice will tell if the renewed has been successfully done. Note that this patch is not ready to be pushed yet, as it has some defects: - 1 notice per issue - no way to disable the notice generation - no way to specify patron categories to enable/disable the notifications Test plan: Use the automatic_renewals.pl script to auto renew issues. If the auto renew has failed or succeeded, a notice will be generated in the message_queue table. If the error is "too_soon" or is the same as the previous error, the notice won't be generated (we do not want to spam the patron).
Created attachment 61081 [details] [review] Bug 15705: DB Changes - Add [old_]issues.auto_renew_error and the AUTO_RENEWALS notice
Created attachment 61082 [details] [review] Bug 15705: Add is_tt param to the new letter
Created attachment 61083 [details] [review] Bug 15705: [DO NOT PUSH] DBIC Schema
Created attachment 61084 [details] [review] Bug 15705: Increasing size of auto_renew_error to 32 auto_too_much_oweing is bigger than 16, so we need more!
Created attachment 61085 [details] [review] Bug 15705: DO NOT PUSH DBIC Changes
Created attachment 61086 [details] [review] Bug 15705: Add specific warning messages for auto_too_much_oweing
Created attachment 61495 [details] [review] Bug 15705: Notify the user on auto renewing When an issue is auto renewed, a notice will be sent to the patron. The notice will tell if the renewed has been successfully done. Note that this patch is not ready to be pushed yet, as it has some defects: - 1 notice per issue - no way to disable the notice generation - no way to specify patron categories to enable/disable the notifications Test plan: Use the automatic_renewals.pl script to auto renew issues. If the auto renew has failed or succeeded, a notice will be generated in the message_queue table. If the error is "too_soon" or is the same as the previous error, the notice won't be generated (we do not want to spam the patron). Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 61496 [details] [review] Bug 15705: DB Changes - Add [old_]issues.auto_renew_error and the AUTO_RENEWALS notice Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 61497 [details] [review] Bug 15705: Add is_tt param to the new letter Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 61498 [details] [review] Bug 15705: [DO NOT PUSH] DBIC Schema Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 61499 [details] [review] Bug 15705: Increasing size of auto_renew_error to 32 auto_too_much_oweing is bigger than 16, so we need more! Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 61500 [details] [review] Bug 15705: DO NOT PUSH DBIC Changes Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 61501 [details] [review] Bug 15705: Add specific warning messages for auto_too_much_oweing Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Independently tested by Jonathan Field and Janet McGowan at PTFS Europe, I'm juts acting as the bugzilla gopher here, uploading the signed patches.
Comment on attachment 61497 [details] [review] Bug 15705: Add is_tt param to the new letter This column has been abandoned on bug 14757, we should not use it here.
Created attachment 61739 [details] [review] Bug 15705: Reset the last error when an auto renew successes The auto_renew_error has to be reset when an auto renew successes, otherwise the patron is not going to receive the correct notice. Test plan; - Checkin an item and mark it as auto renewal (specify a due date in the past to allow auto renewals) - Set OPACFineNoRenewalsBlockAutoRenew to 'Block' and 'OPACFineNoRenewals' to '1' - Execute the script => Auto renewed, column auto_renew_error is null - Add a fine of '2' to the patron - Execute the script => Not auto renewed, column auto_renew_error is 'auto_too_much_oweing' => On the interface youo see the correct message "Automatic renewal failed, patron has unpaid fines" - Pay the fine - Execute the script Without this patch the auto_renew_error is not reset and the patron is going to receive a letter telling him he own too much money to the library With this patch the patron will receive a letter to inform him the renew has been done!
Last minute bug found, resetting the status to request another signoff on the last patch.
Created attachment 62072 [details] [review] Bug 15705: Reset the last error when an auto renew successes The auto_renew_error has to be reset when an auto renew successes, otherwise the patron is not going to receive the correct notice. Test plan; - Checkin an item and mark it as auto renewal (specify a due date in the past to allow auto renewals) - Set OPACFineNoRenewalsBlockAutoRenew to 'Block' and 'OPACFineNoRenewals' to '1' - Execute the script => Auto renewed, column auto_renew_error is null - Add a fine of '2' to the patron - Execute the script => Not auto renewed, column auto_renew_error is 'auto_too_much_oweing' => On the interface youo see the correct message "Automatic renewal failed, patron has unpaid fines" - Pay the fine - Execute the script Without this patch the auto_renew_error is not reset and the patron is going to receive a letter telling him he own too much money to the library With this patch the patron will receive a letter to inform him the renew has been done! Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed off on final patch :)
Nick, the conflicts are on the DBIC schema file. Skip these 2 patches and regenerate the schema please.
I really like this enhancement and want to see it get in, failing for reasons noted by Jonathan - 1 notice per issue **I think this could be later enhancement - is nice but not critical - no way to disable the notice generation - no way to specify patron categories to enable/disable the notifications **This could be covered by adding the option to patron messaging preferences, combination of preference 'RenewalSendNotice' and checkout notice options are similar so not sure what the most clear path is, could be script parameters too? Renewal success/failure messages in opac/staff client should be split onto a new bug
Created attachment 63036 [details] [review] Bug 15705: DBIC Schema changes
Created attachment 63037 [details] [review] Bug 15705: Add --send-notices to the cronjob script
Nick, I added a --send-notices flag to the script. I opened bug 18532, which may be sponsored soon, to tuned this option more granularly. Hope it makes sense to you to have this enhancement in as it.
Created attachment 63138 [details] [review] Bug 15705: Notify the user on auto renewing When an issue is auto renewed, a notice will be sent to the patron. The notice will tell if the renewed has been successfully done. Note that this patch is not ready to be pushed yet, as it has some defects: - 1 notice per issue - no way to disable the notice generation - no way to specify patron categories to enable/disable the notifications Test plan: Use the automatic_renewals.pl script to auto renew issues. If the auto renew has failed or succeeded, a notice will be generated in the message_queue table. If the error is "too_soon" or is the same as the previous error, the notice won't be generated (we do not want to spam the patron). Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 63139 [details] [review] Bug 15705: Add specific warning messages for auto_too_much_oweing Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 63140 [details] [review] Bug 15705: Reset the last error when an auto renew successes The auto_renew_error has to be reset when an auto renew successes, otherwise the patron is not going to receive the correct notice. Test plan; - Checkin an item and mark it as auto renewal (specify a due date in the past to allow auto renewals) - Set OPACFineNoRenewalsBlockAutoRenew to 'Block' and 'OPACFineNoRenewals' to '1' - Execute the script => Auto renewed, column auto_renew_error is null - Add a fine of '2' to the patron - Execute the script => Not auto renewed, column auto_renew_error is 'auto_too_much_oweing' => On the interface youo see the correct message "Automatic renewal failed, patron has unpaid fines" - Pay the fine - Execute the script Without this patch the auto_renew_error is not reset and the patron is going to receive a letter telling him he own too much money to the library With this patch the patron will receive a letter to inform him the renew has been done! Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 63141 [details] [review] Bug 15705: DBIC Schema changes Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 63142 [details] [review] Bug 15705: Add --send-notices to the cronjob script Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 63143 [details] [review] Bug 15705: DB Changes - Add [old_]issues.auto_renew_error and the AUTO_RENEWALS notice Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 63144 [details] [review] Bug 15705 (QA Followup) Remove unused variable, fix typo and add due date to notice Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 17.05, thanks Jonathan, Nick!
This won't get ported back to 16.11.x as it is an enhancement.