Bug 11678

Summary: Gather print notices: send files by email
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: NoticesAssignee: claire.hernandez <claire.hernandez>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aurelie.fichot, dcook, f.demians, gwilliams, josef.moravec, jschmidt, julian.maurice, kyle.m.hall, larry, matthias.meusburger, michaela.sieber, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12810
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11603
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 11603    
Bug Blocks:    
Attachments: Bug 11678: Gather print notices: add --email parameter
Bug 11678: Gather print notices: add --email parameter
Bug 11678: Gather print notices: add --email parameter
Bug 11678: Gather print notices: add --email parameter
Bug 11678: Improve documentation of new parameter
[PASSED QA] Bug 11678: Gather print notices: add --email parameter
[PASSED QA] Bug 11678: Improve documentation of new parameter
Bug 11678: QA follow-up - Fixing some typos in the documentation

Description Jonathan Druart 2014-02-04 14:11:07 UTC
Bug 11603 allows to generate 3 types of files: html, csv and ods.
This patch will add a --email parameter in order to send the generated files by email.
Comment 1 Jonathan Druart 2014-02-04 14:16:58 UTC Comment hidden (obsolete)
Comment 2 Aurélie Fichot 2014-03-12 14:25:50 UTC
The sandbox you've requested is not ready.
Some problems occurred applying patches from bug 11678:
<h1>Something went wrong !</h1>Applying: Bug 11678: Gather print notices: add --email parameter
fatal: sha1 information is lacking or useless (misc/cronjobs/gather_print_notices.pl).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 11678: Gather print notices: add --email parameter
When you have resolved this problem run git bz apply --continue.
If you would prefer to skip this patch, instead run git bz apply --skip.
To restore the original branch and stop patching run git bz apply --abort.
Bug 11678 - Gather print notices: send files by email

25025 - Bug 11678: Gather print notices: add --email parameter

Apply? [(y)es, (n)o, (i)nteractive] Patch left in /tmp/Bug-11678-Gather-print-notices-add---email-paramet-zFtjtl.patch .
Comment 3 Jonathan Druart 2014-03-12 14:30:24 UTC
This patch depends on bug 11603.
Comment 4 David Cook 2014-04-24 03:28:45 UTC
I like the idea of emailing the print notices, but I'm not sure that I like the idea of using a parameter to achieve this.

Wouldn't it be a better idea to send the email to the pick-up library, and failing that the KohaAdminEmailAddress?
Comment 5 David Cook 2014-04-24 03:29:29 UTC
(In reply to David Cook from comment #4)
> I like the idea of emailing the print notices, but I'm not sure that I like
> the idea of using a parameter to achieve this.
> 
> Wouldn't it be a better idea to send the email to the pick-up library, and
> failing that the KohaAdminEmailAddress?

I say this in part because it seems like needless duplication/maintenance to specify a library email address in the cronjob when it's already available to Koha.
Comment 6 Jonathan Druart 2014-04-24 13:25:52 UTC
(In reply to David Cook from comment #5)
> I say this in part because it seems like needless duplication/maintenance to
> specify a library email address in the cronjob when it's already available
> to Koha.

Yes, maybe it could be done later, if someone wants.
The need was not to sent an email to the library email address defined into Koha but to several other emails.
Comment 7 Jonathan Druart 2014-08-19 13:02:41 UTC Comment hidden (obsolete)
Comment 8 Frédéric Demians 2015-04-14 19:31:08 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2015-06-07 00:12:33 UTC
*** Bug 12810 has been marked as a duplicate of this bug. ***
Comment 10 Kyle M Hall 2015-09-18 13:53:01 UTC
Documentation for the new parameter does not mention that it's repeatable.
Comment 11 Julian Maurice 2015-10-19 08:52:57 UTC Comment hidden (obsolete)
Comment 12 Julian Maurice 2015-10-19 08:53:05 UTC Comment hidden (obsolete)
Comment 13 Katrin Fischer 2015-10-24 22:14:20 UTC
Just noting: an odt export would also be very nice - with every notice on a separate page! :)
Comment 14 Katrin Fischer 2015-10-24 22:23:08 UTC
Created attachment 43939 [details] [review]
[PASSED QA] Bug 11678: Gather print notices: add --email parameter

This patch add the ability to send generated files by email.

You can specify several emails.

Test plan:
- same as Bug 11603
- call the script misc/cronjobs/gather_print_notices.pl with the
  following parameters:

perl misc/cronjobs/gather_print_notices.pl /tmp/test --csv --ods --html
--letter_code=CHECKIN -d=: --email="email_one@example.org"
--email="email_two@example.org"

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  - Works as desribed. Rebased upon bug-11603.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 15 Katrin Fischer 2015-10-24 22:23:11 UTC
Created attachment 43940 [details] [review]
[PASSED QA] Bug 11678: Improve documentation of new parameter

Say --email is repeatable

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2015-10-24 22:23:15 UTC
Created attachment 43941 [details] [review]
Bug 11678: QA follow-up - Fixing some typos in the documentation
Comment 17 Tomás Cohen Arazi (tcohen) 2015-11-04 14:30:07 UTC
Patches pushed to master.

Thanks Julian and Jonathan!