[Bug 9103] New: overdue_notices.pl does not use AutoEmailPrimaryAddress syspref
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Bug ID: 9103 Summary: overdue_notices.pl does not use AutoEmailPrimaryAddress syspref Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Command-line Utilities Assignee: gmcharlt@gmail.com Reporter: fridolyn.somers@biblibre.com Script overdue_notices.pl creates a printed letter if borrower as no email. Actually, only 'email' field of borrower is tested. Email field should depend on AutoEmailPrimaryAddress syspref like in other letter creations. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|overdue_notices.pl does not |overdue_notices.pl should |use AutoEmailPrimaryAddress |use AutoEmailPrimaryAddress |syspref |syspref -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=6835 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|gmcharlt@gmail.com |fridolyn.somers@biblibre.co | |m --- Comment #1 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 13511 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13511&action=edit Proposed patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 --- Comment #2 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- This patch may impact Bug 6835. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=9104 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Julien Sicot <julien.sicot@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |julien.sicot@gmail.com --- Comment #3 from Julien Sicot <julien.sicot@gmail.com> --- tested on koha master (3.09.00.062). Everything seems ok - with patron's email address specified on "primary email" field AND syspref "AutoEmailPrimaryAddress" on "home" => notice sent to patron | OK - with patron's email address specified on "secondary email" field AND syspref "AutoEmailPrimaryAddress" on "work" => notice sent to patron | OK - with patron's email address specified on "alternate email" field AND syspref "AutoEmailPrimaryAddress" on "alternate" => notice sent to patron | OK - with patron's email address specified on "secondary email" OR "alternate email" field AND syspref "AutoEmailPrimaryAddress" on "home" => no notice sent to patron, overdue notice sent to koha admin | OK - with patron's email address specified on "primary email" OR "secondary email" field AND syspref "AutoEmailPrimaryAddress" on "alternate" => no notice sent to patron, overdue notice sent to koha admin | OK - with patron's email address specified on "primary email" OR "secondary email" OR "alternate email" field and syspref "AutoEmailPrimaryAddress" on "first valid" => notice sent to patron | OK Julien Sicot Systems Librarian Rennes 2 University -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Fridolyn, I like the idea to have a new sub that returns the correct email for the borrower according to the AutoEmailPrimaryAddress system preference. What bugs me a bit about it is the name of the new sub "GetPrimaryEmailAddress". I am not sure if you are aware of it, but some time ago the email and phone number fields in the patron record got renamed. The first email field in the English templates is now named 'Primary email:' - That makes it a bit confusing. Could you maybe choose a better name? Extra bonus points if you include some unit tests. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13511|0 |1 is obsolete| | --- Comment #5 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 15931 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15931&action=edit Proposed patch (revised) Due to Bug 6835 integration in master, I've rewritten patch. New patch renames as asked method GetPrimaryEmailAddress into GetNoticeEmailAddress, meaning the email used to sent notices. Bug 6835 added a GetMember() call to get emails. I changed to get them in the existing query. A consequence is the use of fetchrow_hashref to have datas into a hash. This is more useful and generally used to get query results. Also, prepare_letter_for_printing was called twice where it can be once. See test plan on comment 3. Note that if --email option is used, it overrides notice email address. I could uses some help on a more complex one and for unit test. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 MJ Ray (software.coop) <mjr@software.coop> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15931|0 |1 is obsolete| | --- Comment #6 from MJ Ray (software.coop) <mjr@software.coop> --- Created attachment 16110 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16110&action=edit Bug 9103: overdue_notices.pl should use AutoEmailPrimaryAddress syspref Script overdue_notices.pl creates a printed letter if borrower as no email. Actually, unless --email option is used, first valid email of borrower is used. Email field should depend on AutoEmailPrimaryAddress syspref like in other letter creations. Signed-off-by: MJ Ray <mjr@phonecoop.coop> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 MJ Ray (software.coop) <mjr@software.coop> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |mjr@software.coop --- Comment #7 from MJ Ray (software.coop) <mjr@software.coop> --- Looks good to me. perl -c C4/Letters.pm produces lots of warnings, but they were there before. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Back to that now. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|Small patch |Medium patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #16110|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 16248 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16248&action=edit [PASSED QA] Bug 9103: overdue_notices.pl should use AutoEmailPrimaryAddress syspref Script overdue_notices.pl creates a printed letter if borrower as no email. Actually, unless --email option is used, first valid email of borrower is used. Email field should depend on AutoEmailPrimaryAddress syspref like in other letter creations. Signed-off-by: MJ Ray <mjr@phonecoop.coop> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests and QA script pass. Following test plan from Julien Sicot from Bugzilla: - with patron's email address specified on "primary email" field AND syspref "AutoEmailPrimaryAddress" on "home" => notice sent to patron | OK - with patron's email address specified on "secondary email" field AND syspref "AutoEmailPrimaryAddress" on "work" => notice sent to patron | OK - with patron's email address specified on "alternate email" field AND syspref "AutoEmailPrimaryAddress" on "alternate" => notice sent to patron | OK - with patron's email address specified on "secondary email" OR "alternate email" field AND syspref "AutoEmailPrimaryAddress" on "home" => no notice sent to patron, overdue notice sent to koha admin | OK - with patron's email address specified on "primary email" OR - with patron's email address specified on "primary email" field AND syspref "AutoEmailPrimaryAddress" on "home" => notice sent to patron | OK - with patron's email address specified on "secondary email" field AND syspref "AutoEmailPrimaryAddress" on "work" => notice sent to patron | OK - with patron's email address specified on "alternate email" field AND syspref "AutoEmailPrimaryAddress" on "alternate" => notice sent to patron | OK - with patron's email address specified on "secondary email" OR "alternate email" field AND syspref "AutoEmailPrimaryAddress" on "home" => no notice sent to patron, overdue notice sent to koha admin | OK - with patron's email address specified on "primary email" OR "secondary email" field AND syspref "AutoEmailPrimaryAddress" on "alternate" => no notice sent to patron, overdue notice sent to koha admin | OK - with patron's email address specified on "primary email" OR "secondary email" OR "alternate email" field and syspref "AutoEmailPrimaryAddress" on "first valid" => notice sent to patron | OK"secondary email" field AND syspref "AutoEmailPrimaryAddress" on "alternate" => no notice sent to patron, overdue notice sent to koha admin | OK - with patron's email address specified on "primary email" OR "secondary email" OR "alternate email" field and syspref "AutoEmailPrimaryAddress" on "first valid" => notice sent to patron | OK Note: Options for AutoEmailPrimaryAddress should be like the field names on the patron form (primary, secondary...), but this is outside the scope of this patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #10 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- C4::Members::GetNoticeEmailAddress needs a unit test. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 --- Comment #11 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 16452 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16452&action=edit Bug 9103 : Follow up adding unit test -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #12 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Passing QA as the unit test follow-up meets my requirements. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9103 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #13 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org