Bug 24511

Summary: Patron emailer report not using specified email column
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Command-line UtilitiesAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: 1joynelson, hayleypelham, kelly, lucas, robin
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.03, 19.05.08
Circulation function:
Attachments: Bug 24511: Update variable names to avoid confusion
Bug 24511: Update variable names to avoid confusion
Bug 24511: Update variable names to avoid confusion

Description Nick Clemens (kidclamp) 2020-01-24 14:58:22 UTC
The script takes a specific column to use as the to email address, however, due to variable confusion, the column is not respected
Comment 1 Nick Clemens (kidclamp) 2020-01-24 15:03:54 UTC
Created attachment 97884 [details] [review]
Bug 24511: Update variable names to avoid confusion

To test:
1 - Create a report
    SELECT borrowernumber, firstname, surname, email, emailpro FROM borrowers WHERE surname='acosta'
2 - Create or edit patron with surname acosta to have a separate email and emailpro
3 - perl misc/cronjobs/patron_emailer --notice HOLDS --module reserves --verbose --email emailpro --report ## --from 'me@you.us'
4 - Note email is used, not email pro
5 - Apply patch
6 - Repeat, correct eamil is used
Comment 2 ByWater Sandboxes 2020-01-24 18:07:48 UTC
Created attachment 97892 [details] [review]
Bug 24511: Update variable names to avoid confusion

To test:
1 - Create a report
    SELECT borrowernumber, firstname, surname, email, emailpro FROM borrowers WHERE surname='acosta'
2 - Create or edit patron with surname acosta to have a separate email and emailpro
3 - perl misc/cronjobs/patron_emailer --notice HOLDS --module reserves --verbose --email emailpro --report ## --from 'me@you.us'
4 - Note email is used, not email pro
5 - Apply patch
6 - Repeat, correct eamil is used

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Comment 3 Kelly McElligott 2020-01-24 18:09:17 UTC
The line should be this : 

perl misc/cronjobs/patron_emailer.pl --notice HOLD --module reserves --verbose --email emailpro --report ## --from 'me@you.us'


but it did work as expected. It used the emailpro email when running this cron line.
Comment 4 Katrin Fischer 2020-01-25 18:29:58 UTC
Created attachment 97942 [details] [review]
Bug 24511: Update variable names to avoid confusion

To test:
1 - Create a report
    SELECT borrowernumber, firstname, surname, email, emailpro FROM borrowers WHERE surname='acosta'
2 - Create or edit patron with surname acosta to have a separate email and emailpro
3 - perl misc/cronjobs/patron_emailer --notice HOLDS --module reserves --verbose --email emailpro --report ## --from 'me@you.us'
4 - Note email is used, not email pro
5 - Apply patch
6 - Repeat, correct eamil is used

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Martin Renvoize (ashimema) 2020-01-27 10:17:31 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 6 Joy Nelson 2020-02-10 22:32:09 UTC
Pushed to 19.11.x for 19.11.03
Comment 7 Lucas Gass (lukeg) 2020-02-14 18:13:18 UTC
backported to 19.05.x for 19.05.08
Comment 8 Hayley Pelham 2020-02-17 03:32:46 UTC
Dependency (script patron_emailer) not present in 18.11, so will not be backported to 18.11.x series.