Added rake task for auto create of upcoming workgroup tasks (weekly tasks).
This commit is contained in:
parent
7e2506baa2
commit
d8cdbe4abb
6 changed files with 39 additions and 9 deletions
|
|
@ -55,9 +55,19 @@ class Workgroup < Group
|
|||
nextTasks = Array.new
|
||||
number.times do
|
||||
nextTasks << nextTask
|
||||
nextTask = 1.week.from_now(nextTask)
|
||||
nextTask = 1.week.from_now(nextTask).to_date
|
||||
end
|
||||
return nextTasks
|
||||
end
|
||||
|
||||
def task_attributes(date)
|
||||
{
|
||||
:name => task_name,
|
||||
:description => task_description,
|
||||
:due_date => date,
|
||||
:required_users => task_required_users,
|
||||
:weekly => true
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue