Added rake task to notify workgroup members if not enough users assigned an upcoming task.
This commit is contained in:
parent
d8cdbe4abb
commit
49be55238b
4 changed files with 35 additions and 3 deletions
|
|
@ -67,6 +67,13 @@ class Mailer < ActionMailer::Base
|
|||
body :user => user, :message => message
|
||||
end
|
||||
|
||||
def not_enough_users_assigned(task,user)
|
||||
prepare_system_message(user)
|
||||
subject "[#{Foodsoft.config[:name]}] #{task.name} braucht noch Leute!"
|
||||
body :task => task, :user => user,
|
||||
:task_url => File.join(Foodsoft.config[:base_url], "tasks/workgroup", task.workgroup_id.to_s)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def prepare_system_message(recipient)
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ class Workgroup < Group
|
|||
# now generate the Array
|
||||
nextTasks = Array.new
|
||||
number.times do
|
||||
nextTasks << nextTask
|
||||
nextTask = 1.week.from_now(nextTask).to_date
|
||||
nextTasks << nextTask.to_date
|
||||
nextTask = 1.week.from_now(nextTask)
|
||||
end
|
||||
return nextTasks
|
||||
end
|
||||
|
|
@ -69,5 +69,5 @@ class Workgroup < Group
|
|||
:weekly => true
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue