start = self.params.get_str('start')
end = self.params.get_str('end')
if not end:
- end = date_in_n_days(60)
+ end = date_in_n_days(366)
ret = Day.by_date_range_with_limits(self.conn, (start, end), 'id')
days, start, end = ret
days = Day.with_filled_gaps(days, start, end)
"""Show single Day of ?date=."""
date = self.params.get_str('date', date_in_n_days(0))
todays_todos = Todo.by_date(self.conn, date)
+ total_effort = 0.0
+ for todo in todays_todos:
+ total_effort += todo.performed_effort
conditions_present = []
enablers_for = {}
disablers_for = {}
top_nodes = [t.get_step_tree(seen_todos)
for t in todays_todos if not t.parents]
return {'day': Day.by_id(self.conn, date, create=True),
+ 'total_effort': total_effort,
'top_nodes': top_nodes,
'enablers_for': enablers_for,
'disablers_for': disablers_for,
todo.set_blockers(self.conn, self.form_data.get_all_int('blocker'))
todo.set_enables(self.conn, self.form_data.get_all_int('enables'))
todo.set_disables(self.conn, self.form_data.get_all_int('disables'))
- todo.is_done = len(self.form_data.get_all_str('done')) > 0
+ if len(self.form_data.get_all_str('done')) > 0 != todo.is_done:
+ todo.is_done = len(self.form_data.get_all_str('done')) > 0
todo.calendarize = len(self.form_data.get_all_str('calendarize')) > 0
todo.comment = self.form_data.get_str('comment', ignore_strict=True)
todo.save(self.conn)