This plugin sends email digests. A digest is a summary of a project’s activity over a period of time. Each project is checked for activity during the specified period of time, and if there is new activity, an email is sent to each user who has opted to receive the digest.
This plugin may be called by a scheduler (cronjob, Windows task, rufus-scheduler, etc.) or run manually from the plugin’s configuration page.
The number of days summarized and the start date of the summary are configured by the site administrator. In conjunction with a scheduler, this will send a daily digest, weekly digest, etc.
-
Drew Keller <drew_-AT-drewkeller-DOT-_com>
For the complete changelog see the CHANGELOG
file in the plugin’s directory.
This plugin includes a rake job which builds a digest or summary of each project and emails it to all of the project’s members.
This plugin is compatible with Redmine 1.2.x and 2.x.
GitHub repository: github.com/drewkeller/redmine_digest
The source of this plugin can be cloned from GitHub using:
$ cd {RAILS_ROOT}/vendor/plugins && git clone git://github.com/drewkeller/redmine_digest.git
-
Download the plugin from the available source github.com/drewkeller/redmine_digest.git
-
Install the plugin as described at: www.redmine.org/wiki/redmine/Plugins (this plugin DOES require a plugin database migration)
Use a scheduler to call the task. The following options can be set on the command line. All of these options are optional. If an option is included on the command line, it overrides the setting on the plugins settings page.
start : number of days ago to start. 0 = today, 1 = start from yesterday, 7 = start a week ago from today days : number of days to include in the digest project : name or id of a specific Redmine project to create a digest for
Create a cron job with a line similar to this (Redmine 1.x):
1 0 * * 1-7 www-data cd /path/to/redmine && /usr/bin/rake redmine:send_digest start=1 days=1 project=myproject RAILS_ENV="production"
Or (Redmine 2.x):
1 0 * * 1-7 www-data cd /path/to/redmine && /usr/bin/rake redmine:send_digest start=1 days=1 project=myproject Rails.env="production"
Or create a Windows task with a line similar to this:
cmd /C rake redmine:send_digest start=1 days=1 project=myproject RAILS_ENV="production" debugging_messages=1
Or install rufus-scheduler and add an initializer to REDMINE_ROOT/config/initializers/digest_tasks.rb, like…
scheduler.cron '01 00 * * 1-7' do
# every day at 00:01 (12:01am) options = { :start => 1, :days => 1, :project => ‘myproject’, :debugging_messages => 1 } DigestController.new.send_digest(options)
end
Here is an example of output from the console, for a weekly digest.
Start: 7 Days : 7 ** Processing project 'test 1'... Summarizing: 2012-02-27 to 2012-03-05 (7 days) From 03/05/2011 to 03/05/2012 Found 3 events. Email sent. Digest done.
-
Creates a daily digest for a single Redmine project. Since “start” and “days” are set on the command line, they can be different from the settings on the plugin settings page.
-
The command lines in the usage section are examples of this strategy.
-
Creates a daily digest for each Redmine project
Set the scheduler to run after midnight. On the plugins settings page, set ‘days to include’ to 1 and set ‘days ago to start’ to 1. Some example scheduler commands are below.
-
Cron job (Redmine 1.x):
1 0 * * 1-7 www-data cd /path/to/redmine && /usr/bin/rake redmine:send_digest RAILS_ENV="production"
-
Cron job (Redmine 2.x):
1 0 * * 1-7 www-data cd /path/to/redmine && /usr/bin/rake redmine:send_digest Rails.env="production"
-
Windows task set to run at 12:01am daily (Redmine 1.x):
cmd /C rake redmine:send_digest RAILS_ENV="production"
-
Windows task set to run at 12:01am daily (Redmine 2.x):
cmd /C rake redmine:send_digest Rails.env="production"
-
rufus-scheduler (REDMINE_ROOT/config/initializers/digest_tasks.rb)
scheduler.cron '01 00 * * 1-7' do
# every day at 00:01 (12:01am) options = { } DigestController.new.send_digest(options)
end
-
Creates a weekly digest for each Redmine project
Set the scheduler to run after midnight. On the plugins settings page, set ‘days to include’ to 7 and set ‘days ago to start’ to 8. Some example scheduler commands are below.
-
Cron job (Redmine 1.x):
1 0 * * 2 www-data cd /path/to/redmine && /usr/bin/rake redmine:send_digest RAILS_ENV="production"
-
Cron job (Redmine 2.x):
1 0 * * 2 www-data cd /path/to/redmine && /usr/bin/rake redmine:send_digest Rails.env="production"
-
Windows task set to run at 12:01am weekly (Redmine 1.x):
cmd /C rake redmine:send_digest RAILS_ENV="production"
-
Windows task set to run at 12:01am weekly (Redmine 2.x):
cmd /C rake redmine:send_digest Rails.env="production"
-
rufus-scheduler (REDMINE_ROOT/config/initializers/digest_tasks.rb)
scheduler.cron '01 00 * * 2' do
# on Monday at 00:01 (12:01am) options = { } DigestController.new.send_digest(options)
end
-
Copy the currently deployed Digest plugin folder to a backup folder
-
Update the plugin using
git pull
Or
-
Copy the currently deployed Digest plugin folder to a backup folder
-
Replace the plugin folder and it’s contents with the new one
-
Remove the plugin folder from the plugin-directory “REDMINE_ROOT/vendor/plugins/digest”
-
Remove the cronjob entry or Windows task
This plugin is open-source and licensed under the “GNU General Public License v2” (GPL, www.gnu.org/licenses/old-licenses/gpl-2.0.html). See the included GPL.txt
and LICENSE.txt
files for details.
-
© 2011 Drew Keller
If you would like to report a bug or request a new feature you can:
-
check if issue is listed here: github.com/drewkeller/redmine_digest/issues
-
open a new issue at github.com/drewkeller/redmine_digest/issues/new if you did not find a match
You can also post your feedback about the plugin in the dedicated plugin-section of the Redmine forums (www.redmine.org/projects/redmine/boards/3)
As an alternative you can also join the #redmine
channel on the “freenode IRC network” (freenode.net/irc_servers.shtml) to see if there is anyone who can provide some support.
Please see THANKS.txt