Tasks created for Today or Tomorrow do not appear on /tasks index
Reported by Drew Neil | July 24th, 2009 @ 09:23 AM | in 0.9.7 "Steinitz"
Steps taken
I log in to Fat Free CRM, and go to the 'Tasks' tab. I click 'Create Task', fill in relevant fields and set 'Due' to today, then press 'Create task'. The form slides out of view, and the list is updated to include the task I just created for today. So far so good.
I would expect to see the sidebar menu to be updated (e.g. Today goes from 0 to 1), but this does not happen. If I refresh the page, the new task that I created disappears. (I know that it is still in the database, because it still appears on the Dashboard).
Extra detail
When I look in the database, I see that the task is there, and 'bucket' is set today, but the due_at field looks wrong. Instead of being 00:00 (midnight) of today's date, it is 23:00 of yesterdays date. This suggests it may be an issue with daylight saving.
When I examine the logs, I see that the sql generated for finding tasks due today compares against 00:00 (midnight). So the named_scope :due_today seems to call Date.today correctly, whereas when calling set_due_date Date.today seems to return 23:00 instead of 00:00.
The full test suite passes.
Comments and changes to this ticket
-
Mike Dvorkin July 24th, 2009 @ 11:36 AM
- State changed from new to open
Drew, thanks for reporting the issue. I'm aware of this problem and I'm about to tackle it as part of #55
-
Mike Dvorkin July 26th, 2009 @ 10:23 PM
(from [4be7b576144697df04b88041643212154ff99b1d]) Adding timezone support [#77 state:open] http://github.com/michaeldv/fat_free_crm/commit/4be7b576144697df04b...
-
Mike Dvorkin July 26th, 2009 @ 10:23 PM
(from [6b8b7a9ad0fa7686817a842bcb33b5bbab0a7771]) Converted Task model to use time with timezone instead of date [#77 state:open] http://github.com/michaeldv/fat_free_crm/commit/6b8b7a9ad0fa7686817...
-
Mike Dvorkin July 27th, 2009 @ 08:42 PM
- State changed from open to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Ruby on Rails CRM platform for Web 2.0 and beyond
People watching this ticket
Referenced by
- 55 Add time zone field to user profile See #77 for more details
- 77 Tasks created for Today or Tomorrow do not appear on /tasks index (from [4be7b576144697df04b88041643212154ff99b1d]) Adding ...
- 77 Tasks created for Today or Tomorrow do not appear on /tasks index (from [6b8b7a9ad0fa7686817a842bcb33b5bbab0a7771]) Convert...