2015-08-04 23:08:13 +02:00
|
|
|
# Please note that dates in yml are not converted to utc timezone like
|
|
|
|
|
# rails does automatically in models or controllers! Convert to utc manually!
|
|
|
|
|
|
2010-07-29 16:37:22 +02:00
|
|
|
<%
|
2009-02-07 22:02:58 +01:00
|
|
|
def today
|
2015-08-04 23:08:13 +02:00
|
|
|
Time.zone.now.utc.beginning_of_day.to_s(:db)
|
2009-02-07 22:02:58 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def next_week
|
2015-08-04 23:08:13 +02:00
|
|
|
1.week.from_now.utc.beginning_of_day.to_s(:db)
|
2009-02-07 22:02:58 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def last_week
|
2015-08-04 23:08:13 +02:00
|
|
|
1.week.ago.utc.beginning_of_day.to_s(:db)
|
2009-02-07 22:02:58 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def two_weeks_ago
|
2015-08-04 23:08:13 +02:00
|
|
|
2.weeks.ago.utc.beginning_of_day.to_s(:db)
|
2009-02-07 22:02:58 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def two_weeks_hence
|
2015-08-04 23:08:13 +02:00
|
|
|
2.weeks.from_now.utc.beginning_of_day.to_s(:db)
|
2010-07-29 16:37:22 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def way_back
|
2015-08-04 23:08:13 +02:00
|
|
|
Time.zone.local(2008,1,1).utc.to_s(:db)
|
2009-02-07 22:02:58 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
%>
|
|
|
|
|
|
2009-06-02 21:22:50 +02:00
|
|
|
call_bill_gates_every_day:
|
2008-07-19 20:27:45 +02:00
|
|
|
id: 1
|
|
|
|
|
user_id: 1
|
|
|
|
|
context_id: 1
|
|
|
|
|
project_id: 2
|
|
|
|
|
description: Call Bill Gates every day
|
|
|
|
|
notes: ~
|
|
|
|
|
state: active
|
2010-07-29 16:37:22 +02:00
|
|
|
start_from: <%= way_back %>
|
2008-07-19 20:27:45 +02:00
|
|
|
ends_on: no_end_date
|
|
|
|
|
end_date: ~
|
2015-02-10 15:49:13 +01:00
|
|
|
number_of_occurrences: ~
|
2008-07-19 20:27:45 +02:00
|
|
|
target: due_date
|
|
|
|
|
show_from_delta: ~
|
|
|
|
|
recurring_period: daily
|
|
|
|
|
recurrence_selector: ~
|
2012-08-28 08:39:52 -05:00
|
|
|
show_always: true
|
2008-07-19 20:27:45 +02:00
|
|
|
every_other1: 1
|
|
|
|
|
every_other2: ~
|
|
|
|
|
every_other3: ~
|
|
|
|
|
every_day: ~
|
|
|
|
|
only_work_days: false
|
|
|
|
|
every_count: ~
|
|
|
|
|
weekday: ~
|
|
|
|
|
created_at: <%= last_week %>
|
|
|
|
|
completed_at: ~
|
|
|
|
|
|
2009-06-02 21:22:50 +02:00
|
|
|
call_bill_gates_every_workday:
|
2008-07-19 20:27:45 +02:00
|
|
|
id: 2
|
|
|
|
|
user_id: 1
|
|
|
|
|
context_id: 1
|
|
|
|
|
project_id: 2
|
|
|
|
|
description: Call Bill Gates every workday
|
|
|
|
|
notes: ~
|
|
|
|
|
state: active
|
|
|
|
|
start_from: ~
|
|
|
|
|
ends_on: no_end_date
|
|
|
|
|
end_date: ~
|
2015-02-10 15:49:13 +01:00
|
|
|
number_of_occurrences: ~
|
2008-07-19 20:27:45 +02:00
|
|
|
target: due_date
|
|
|
|
|
show_from_delta: ~
|
2012-08-28 08:39:52 -05:00
|
|
|
show_always: false
|
2008-07-19 20:27:45 +02:00
|
|
|
recurring_period: daily
|
|
|
|
|
recurrence_selector: ~
|
2010-05-02 18:16:29 +02:00
|
|
|
every_other1: 1
|
2008-07-19 20:27:45 +02:00
|
|
|
every_other2: ~
|
|
|
|
|
every_other3: ~
|
|
|
|
|
every_day: ~
|
|
|
|
|
only_work_days: true
|
|
|
|
|
every_count: ~
|
|
|
|
|
weekday: ~
|
|
|
|
|
created_at: <%= last_week %>
|
|
|
|
|
completed_at: ~
|
|
|
|
|
|
2009-06-02 21:22:50 +02:00
|
|
|
call_bill_gates_every_week:
|
2008-07-19 20:27:45 +02:00
|
|
|
id: 3
|
|
|
|
|
user_id: 1
|
|
|
|
|
context_id: 1
|
|
|
|
|
project_id: 2
|
|
|
|
|
description: Call Bill Gates every week
|
|
|
|
|
notes: ~
|
|
|
|
|
state: active
|
2010-07-29 16:37:22 +02:00
|
|
|
start_from: <%= way_back %>
|
2008-07-19 20:27:45 +02:00
|
|
|
ends_on: no_end_date
|
|
|
|
|
end_date: ~
|
2015-02-10 15:49:13 +01:00
|
|
|
number_of_occurrences: ~
|
2008-07-19 20:27:45 +02:00
|
|
|
target: due_date
|
2014-02-23 15:13:53 +01:00
|
|
|
show_from_delta: 5
|
2008-07-19 20:27:45 +02:00
|
|
|
recurring_period: weekly
|
|
|
|
|
recurrence_selector: ~
|
2012-08-28 08:39:52 -05:00
|
|
|
show_always: false
|
2008-07-19 20:27:45 +02:00
|
|
|
every_other1: 2
|
|
|
|
|
every_other2: ~
|
|
|
|
|
every_other3: ~
|
|
|
|
|
every_day: smtwtfs
|
|
|
|
|
only_work_days: false
|
|
|
|
|
every_count: ~
|
|
|
|
|
weekday: ~
|
|
|
|
|
created_at: <%= last_week %>
|
|
|
|
|
completed_at: ~
|
|
|
|
|
|
2009-06-02 21:22:50 +02:00
|
|
|
check_with_bill_every_last_friday_of_month:
|
2008-07-19 20:27:45 +02:00
|
|
|
id: 4
|
|
|
|
|
user_id: 1
|
|
|
|
|
context_id: 1
|
|
|
|
|
project_id: 2
|
|
|
|
|
description: Check with Bill every last friday of the month
|
|
|
|
|
notes: ~
|
|
|
|
|
state: active
|
2010-07-29 16:37:22 +02:00
|
|
|
start_from: <%= way_back %>
|
2008-07-19 20:27:45 +02:00
|
|
|
ends_on: no_end_date
|
|
|
|
|
end_date: ~
|
2015-02-10 15:49:13 +01:00
|
|
|
number_of_occurrences: ~
|
2008-07-19 20:27:45 +02:00
|
|
|
target: due_date
|
|
|
|
|
show_from_delta: 5
|
|
|
|
|
recurring_period: monthly
|
|
|
|
|
recurrence_selector: 1
|
2012-08-28 08:39:52 -05:00
|
|
|
show_always: false
|
2008-07-19 20:27:45 +02:00
|
|
|
every_other1: 1
|
|
|
|
|
every_other2: 2
|
|
|
|
|
every_other3: 5
|
|
|
|
|
every_day: ~
|
|
|
|
|
only_work_days: false
|
|
|
|
|
every_count: 5
|
|
|
|
|
weekday: ~
|
|
|
|
|
created_at: <%= last_week %>
|
|
|
|
|
completed_at: ~
|
|
|
|
|
|
2009-06-02 21:22:50 +02:00
|
|
|
birthday_reinier:
|
2008-07-19 20:27:45 +02:00
|
|
|
id: 5
|
|
|
|
|
user_id: 1
|
|
|
|
|
context_id: 1
|
|
|
|
|
project_id: 2
|
|
|
|
|
description: Congratulate Reinier on his birthday
|
|
|
|
|
notes: ~
|
|
|
|
|
state: active
|
2010-07-29 16:37:22 +02:00
|
|
|
start_from: <%= way_back %>
|
2008-07-19 20:27:45 +02:00
|
|
|
ends_on: no_end_date
|
|
|
|
|
end_date: ~
|
2015-02-10 15:49:13 +01:00
|
|
|
number_of_occurrences: ~
|
2008-07-19 20:27:45 +02:00
|
|
|
target: due_date
|
|
|
|
|
show_from_delta: 5
|
2012-08-28 08:39:52 -05:00
|
|
|
show_always: false
|
2008-07-19 20:27:45 +02:00
|
|
|
recurring_period: yearly
|
|
|
|
|
recurrence_selector: 0
|
|
|
|
|
every_other1: 8
|
|
|
|
|
every_other2: 6
|
|
|
|
|
every_other3: ~
|
|
|
|
|
every_day: ~
|
|
|
|
|
only_work_days: false
|
|
|
|
|
every_count: ~
|
|
|
|
|
weekday: ~
|
|
|
|
|
created_at: <%= last_week %>
|
2012-08-28 08:39:52 -05:00
|
|
|
completed_at: ~
|