-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(#4794) Schedule and send reports #5205
(#4794) Schedule and send reports #5205
Conversation
39d50e3
to
9e35281
Compare
5a38bb0
to
81a069a
Compare
app/bundles/ReportBundle/Scheduler/Command/ExportSchedulerCommand.php
Outdated
Show resolved
Hide resolved
// this up() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql("ALTER TABLE {$this->prefix}reports ADD is_scheduled TINYINT(1) NOT NULL, ADD schedule_unit VARCHAR(255) DEFAULT NULL, ADD schedule_day VARCHAR(255) DEFAULT NULL, ADD schedule_month_frequency VARCHAR(255) DEFAULT NULL"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alanhartless didn't we agree that each migration should take care of only one column?
33bc09f
to
9e1a369
Compare
Is this ready to be tested? |
Yes it is.
On Wed, Nov 15, 2017 at 19:28, jimeno <notifications@github.com> wrote:
Is this ready to be tested?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub [#5205 (comment)] , or mute the thread [https://github.com/notifications/unsubscribe-auth/AAD3UPg1w51L7T9_cTcDYFL7BTnVjitZks5s24-5gaJpZM4QGIr7] .
|
b9a1077
to
68fdadf
Compare
Rebased - resolved conflicts. |
68fdadf
to
6a41a3b
Compare
fb28c6c
to
e743619
Compare
Rebased on actual staging. |
Don't forget to regen prod assets if not in dev. |
+1 This is working great. Thanks @Maxell92! My only "complaint" is that in dev mode we get translation errors in the console when sending the report, but they are suppressed in prod env. |
Hello @Maxell92 there is nothing about it in the documentation and especially about the fact that the command Thanks a lot for your help ! |
Hello @npracht, yes, you are right. Thank you very much for your comment! I added documentation of this cron in this PR: mautic/documentation#268. |
thank a lot for your help ! i very appreciate !!! |
Description:
This PR adds an ability to schedule reports and email them to a specified list of users.
Steps to test this PR:
composer install
andapp/console d:m:m
. Clear cache.Schedule
.reports
(scheduled fields should beNULL
) +reports_schedulers
(no records here yet).app/console mautic:reports:scheduler
. There should be no error.week days
option pls :)reports_schedulers
holds only 1 date of next schedule event. Do this with as much combination as possible.to
field and save a report. Make sure you have configured sending emails from your Mautic instance.reports_schedulers
table and edit date of scheduler - set it to some past date.app/console mautic:reports:scheduler
and you should get an email with report. Check the attachment that results match report data.report_export_max_filesize_in_bytes
inapp/ReportBundle/Config/config.php
to have bigger file size than in settings. Set correct date inreports_schedulers
table and send the report. You should get an email with no attached file and link to the report detail.List deprecations along with the new alternative:
List backwards compatibility breaks: