Koha/misc/cronjobs
Hammat Wele 2f8a24bd58
Bug 32740: Add a new option patron home library to OverdueNoticeFrom
This patch add 'patron home library' option to the OverdueNoticeFrom preference. When it's selected notification messages for overdues will be bundled and sent from the borrowing user's home library

To Test
1. Create 3 libraries B1, B2 and B3
    1.1. Go to Koha administration, click on Libraries
    1.2. Click New library
    1.3. Fill the Library Code (ex. B1), Name(ex. B1) and email(ex. b1@test.com) fields.
2. Create a user belonging to B1
    2.1. Go to patron module, click on New patron and patron
    2.2. Fill the Surname,Card number,Primary email,Card number field and select B1 as Library.
3. Create 2 notices : the first belongs to B2 and the second belong to B3
    3.1. Go to Cataloging module and click on new
    3.2. field the required field (000 subfield 0, 003 subfield 0,  005 subfield 0, 008 subfield 0, 040 subfield c,245 subfield a, and 942 subfield c )
    3.3. Click on save
    3.4. In the item form, Select Home library = B2 and Current library = B2 and type a Barcode.
    3.5. Repeat 3.1 3.2 3.3 3.4 to create a second notice belong to B3
4. Have (or create) a default notice for all branches in Notices and Slips Module
5. Make sure you connected to branch B2 or Switch to branch B2
6. checkout item I2 (belonging to B2) to the user created in step 2 (specifying as due date the day before (1 day overdue))
7. switch to branch B3
8. checkout item I3 (belonging to B3) to the user created in step 2 (specifying as due date the day before (1 day overdue))
9. make sure you have defined 'Overdue notice/status triggers' for that patron category, ie with Delay=1 so that 'Overdue Notice' is selected and 'Email' is checked.
Note: we have a user belong to B1, two item: I2 belong to B2, I3 belong to B3 and the user has borrowed I2 from B2 and I3 from B3.
10. Test
    10.1. Search for OverdueNoticeFrom in System preferences and select item home library
    10.2. from cli run 'perl ./misc/cronjobs/overdue_notices.pl'
        => Two new entries will be generated in message_queue DB table, coming from different branches that have the SAME list of overdue items.
        => The sender address is the item home library address for each entry.
11. Apply the patch
12. Search for OverdueNoticeFrom in System preferences
        => There is now 'patron home library' in the options list
13. Select patron home library
14. from cli run 'perl ./misc/cronjobs/overdue_notices.pl'
        => You will see that only one message had been created. Its content shows both B2 and B3 overdue items
        => The sender address matches B1 address (the patron home library).
15. Search for OverdueNoticeFrom in System preferences and select cron
16. from cli run './misc/cronjobs/overdue_notices.pl --frombranch patron-homebranch'
    => you will get the same result at step 14

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.com>

Was failing the qa script, so I perltidied the changed lines.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-11 12:13:04 -03:00
..
holds Bug 34569: (QA follow-up) Tidy block 2023-09-01 12:08:38 -03:00
recalls Bug 33992: Only consider the date when auto-expiring problematic recalls 2023-07-19 12:06:50 -03:00
rss
social_data
thirdparty
advance_notices.pl Bug 34059: Add only issues from the branch that is creating the notice 2023-08-15 11:25:39 +03:00
archive_purchase_suggestions.pl
automatic_checkin.pl
automatic_item_modification_by_age.pl
automatic_renewals.pl Bug 33444: (QA follow-up) Tidy block in automatic_renewals.pl 2023-07-19 12:06:53 -03:00
backup.sh
batch_anonymise.pl
build_browser_and_cloud.pl
cart_to_shelf.pl
check-url-quick.pl
cleanup_database.pl Bug 33837: Remove datetime parameter 2023-10-11 10:31:45 -03:00
cloud-kw.pl
cloud-sample.conf
CONFIGURE.gmail
create_koc_db.pl
crontab.example Bug 28688: Add renewal to crontab example 2023-10-10 09:22:31 -03:00
delete_items.pl Bug 33698: Add fields to the verbose output that show the barcode and title of items that cannot be deleted 2023-06-09 08:50:14 -03:00
delete_patrons.pl
delete_records_via_leader.pl
edi_cron.pl
fines.pl Bug 18855: Don't create duplicate overdue fines if an issue is returned 2023-07-06 10:08:44 -03:00
gather_print_notices.pl Bug 34728: (QA follow-up) Remove o modifier, bit more compact 2023-09-18 15:31:50 -03:00
import_webservice_batch.pl
longoverdue.pl
membership_expiry.pl Bug 28688: (follow-up) Remove redundant options 2023-10-10 09:22:32 -03:00
merge_authorities.pl
notice_unprocessed_suggestions.pl
overdue_notices.pl Bug 32740: Add a new option patron home library to OverdueNoticeFrom 2023-10-11 12:13:04 -03:00
patron_emailer.pl
plugins_nightly.pl
printoverdues.sh
process_message_queue.pl Bug 33649: Fix use of cronlogaction 2023-05-05 10:18:37 -03:00
purge_suggestions.pl
reconcile_balances.pl
remove_temporary_edifiles.pl
runreport.pl
serialsUpdate.pl
share_usage_with_koha_community.pl
sitemap.pl Bug 33871: Use Koha object in Sitemapper, add optional filter 2023-09-01 11:23:25 -03:00
staticfines.pl
stockrotation.pl
update_patrons_category.pl
update_totalissues.pl
writeoff_debts.pl Bug 28995: Update aliases 2023-09-08 11:54:55 -03:00