Summary: | overdue_notices.pl --frombranch option should be available as a system preference | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize (ashimema) <martin.renvoize> |
Component: | Circulation | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | andrew, caroline.cyr-la-rose, gmcharlt, jake.deery, kyle.m.hall, lucas, robin |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Caroline Cyr La Rose | Documentation submission: | https://gitlab.com/koha-community/koha-manual/-/merge_requests/586 |
Text to go in the release notes: |
This patch adds a new system preference "OverdueNoticeFrom" that overrides the --frombranch parameter of the overdue_notices.pl cronjob.
This allows systems librarians the option to pick which address to use for overdues notices.
The default value is "command-line option", meaning if there is a branch specified in the cronjob, the behavior will not change.
**Sponsored by** *PTFS Europe*
|
Version(s) released in: |
22.11.00
|
Circulation function: | |||
Attachments: |
Bug 31157: Allow selection for overdue from address in the UI
Bug 31157: Allow selection for overdue from address in the UI Bug 31157: Allow selection for overdue from address in the UI Bug 31157: (QA follow-up) Update descriptions and wording of configuration options |
Description
Martin Renvoize (ashimema)
2022-07-14 15:36:15 UTC
Created attachment 137734 [details] [review] Bug 31157: Allow selection for overdue from address in the UI This patch adds a new system preference to allow systems librarians the option to pick wich address to use for overdues notices. We default to 'cron' to allow existing uses of '--frombranch' on the command line to continue to function but now allow end users to override this option via the new OverdueNoticeFrom preference. To test: 1) Apply patch 2) Put different email addresses in branch A and branch B (doesn't have to be real email addresses, I used centerville@centerville.com and midway@midway.com) 2.1) Go to Administration > Libraries 2.2) Edit branch A (e.g. Centerville) 2.3) Enter an email address in 'Email' 2.4) Save 2.5) Repeat steps 2.1 to 2.4 for branch B (e.g. Midway), making sure it is a different email address 3) Set up overdue notice triggers 3.1) Go to Tools > Overdue notice/status triggers 3.2) Enter a number of days for a patron category (e.g. Patron) 3.3) Choose a letter to be sent (e.g. Overdue notice) 3.4) Check the 'Email' box 3.5) Save 4) Checkout an item from branch A to a patron while logged in at branch B 4.1) In the top right corner, make sure you are connected at branch B (if not, click the branch name and choose set library) 4.1) Go to Patrons 4.2) Search for or add a patron in the patron category from 3.2 4.3) Go to 'Check out' 4.4) Click 'Checkout settings' and select a due date in the past, equal or greater than the number of days from 3.2 4.5) Enter a barcode from an item from branch A and check out 5) Generate overdue notice 5.1) In a terminal, run overdue_notices.pl (without any options) 5.2) Search the database for the from_address of the overdue notice SELECT from_address FROM message_queue WHERE borrowernumber = XX; --> It should be branch B (script defaults to item-issuebranch) 6) Change OverdueNoticeFrom system preference to item home library 6.1) Go to Administration > Global system preferences 6.2) Search for OverdueNoticeFrom 6.3) Choose the 'item home library' option 6.4) Save 7) Delete notice and repeat 7.1) Delete the notice from the database DELETE FROM message_queue WHERE borrowernumber = XX; 7.2) Repeat step 5 --> The from_address should be branch A 8) Change OverdueNoticeFrom system preference to 'checkout library' 9) Delete notice and repeat --> The from_address should be branch B I tried the following combinations Item home library A, Checkout library B, syspref = system default, cron = no option --> from_address is branch B (script defaults to item-issuebranch) Item home library A, Checkout library B, syspref = item home library, cron = no option --> from_address is branch A (item home library according to syspref) Item home library A, Checkout library B, syspref = checkout library, cron = no option --> from_address is branch B (checkout library according to syspref) Item home library A, Checkout library B, syspref = system default, cron = --frombranch item-homebranch --> from_address is branch A (item home library according to cron) Item home library A, Checkout library B, syspref = system default, cron = --frombranch item-issuebranch --> from_address is branch B (checkout library according to cron) Item home library A, Checkout library B, syspref = item home library, cron = --frombranch item-issuebranch --> from_address is branch A (syspref overrides cron) Item home library A, Checkout library B, syspref = checkout library, cron = --frombranch item-homebranch --> from_address is branch B (syspref overrides cron) Created attachment 137736 [details] [review] Bug 31157: Allow selection for overdue from address in the UI This patch adds a new system preference to allow systems librarians the option to pick wich address to use for overdues notices. We default to 'cron' to allow existing uses of '--frombranch' on the command line to continue to function but now allow end users to override this option via the new OverdueNoticeFrom preference. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> I've tried to understand how the code works and I think this doesn't quite work the option and the pref describe it: Set the from address for the notice to one of 'item-homebranch' or 'item-issuebranch'. 1) Option influences item selection To test: * In Centerville, check out: * 1 item from Centerville * 1 item from Fairview Run the overdue_notices script with default/item-issuebranch setting: * checkout library is used, 1 notice, listing both items Run the overdue_notices script with item-homebranch setting: * home library is used, 2 notices, each listing 1 item Conclusion: this is not only about the from address setting, but more importantly it influence how the overdue items are grouped/selected. 2) Email settings item-issuebranch CPL is used item-homebranch CPL and FPL are used, as you'd expect. I feel like this works, but the descriptions make you think it's only about a specific email header setting, which is not true. It will use the 'email configuration' of either the home library or checkout library and it will group the overdue items accordingly. I'll try to provide a follow-up with a suggestion for a slightly different wording. Note: To me it looks like there is something wrong with the returnpath/Sender in the emails, but this is out of scope here. Reply-To is set as expected. Created attachment 138044 [details] [review] Bug 31157: Allow selection for overdue from address in the UI This patch adds a new system preference to allow systems librarians the option to pick wich address to use for overdues notices. We default to 'cron' to allow existing uses of '--frombranch' on the command line to continue to function but now allow end users to override this option via the new OverdueNoticeFrom preference. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Created attachment 138045 [details] [review] Bug 31157: (QA follow-up) Update descriptions and wording of configuration options Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Pushed to master for 22.11. Nice work everyone, thanks! Enhancement will not be backported to 22.05.x series Docs reviewed and merged, thanks Caroline. *** Bug 28549 has been marked as a duplicate of this bug. *** |