Bug 24511 - Patron emailer report not using specified email column
Summary: Patron emailer report not using specified email column
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-24 14:58 UTC by Nick Clemens (kidclamp)
Modified: 2021-06-14 21:29 UTC (History)
5 users (show)

See Also:
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 (4.70 KB, patch)
2020-01-24 15:03 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 24511: Update variable names to avoid confusion (4.76 KB, patch)
2020-01-24 18:07 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 24511: Update variable names to avoid confusion (4.82 KB, patch)
2020-01-25 18:29 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.