Mercurial > hg > soundsoftware-site
comparison lib/tasks/reminder.rake @ 22:40f7cfd4df19
* Update to SVN trunk rev 4173
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 24 Sep 2010 14:06:04 +0100 |
parents | 513646585e45 |
children | 433d4f72a19b |
comparison
equal
deleted
inserted
replaced
14:1d32c0a0efbf | 22:40f7cfd4df19 |
---|---|
20 | 20 |
21 Available options: | 21 Available options: |
22 * days => number of days to remind about (defaults to 7) | 22 * days => number of days to remind about (defaults to 7) |
23 * tracker => id of tracker (defaults to all trackers) | 23 * tracker => id of tracker (defaults to all trackers) |
24 * project => id or identifier of project (defaults to all projects) | 24 * project => id or identifier of project (defaults to all projects) |
25 * users => comma separated list of user ids who should be reminded | |
25 | 26 |
26 Example: | 27 Example: |
27 rake redmine:send_reminders days=7 RAILS_ENV="production" | 28 rake redmine:send_reminders days=7 users="1,23, 56" RAILS_ENV="production" |
28 END_DESC | 29 END_DESC |
29 | 30 |
30 namespace :redmine do | 31 namespace :redmine do |
31 task :send_reminders => :environment do | 32 task :send_reminders => :environment do |
32 options = {} | 33 options = {} |
33 options[:days] = ENV['days'].to_i if ENV['days'] | 34 options[:days] = ENV['days'].to_i if ENV['days'] |
34 options[:project] = ENV['project'] if ENV['project'] | 35 options[:project] = ENV['project'] if ENV['project'] |
35 options[:tracker] = ENV['tracker'].to_i if ENV['tracker'] | 36 options[:tracker] = ENV['tracker'].to_i if ENV['tracker'] |
37 options[:users] = (ENV['users'] || '').split(',').each(&:strip!) | |
36 | 38 |
37 Mailer.reminders(options) | 39 Mailer.reminders(options) |
38 end | 40 end |
39 end | 41 end |