Commit graph

58 commits

Author SHA1 Message Date
Reinier Balt
28e3f377a8 fix failing validation on creating recurring todos 2013-07-20 14:40:50 +02:00
Colin Rymer
0a5936fecf use a null object like a boss 2013-07-18 16:37:34 -05:00
Colin Rymer
55e2f5b6a1 remove returns and clean up some conditionals 2013-07-18 16:03:18 -05:00
Colin Rymer
c71dc9afc9 remove boolean returning ternary expression 2013-07-18 15:22:46 -05:00
Colin Rymer
c5968b798c better leverage Hash#each for metaprogramming 2013-07-18 15:13:30 -05:00
Colin Rymer
332589163c metaprogramming and stylistic changes
- Use `define_method` to clean up definition of methods that only
   vary by the name of the day they reference and the corresponding
   numerical value.

 - Remove calls to self, explicit return statements, etc.
2013-07-18 15:01:02 -05:00
Colin Rymer
45df84b739 consolidate validates_presence_of validations 2013-07-18 14:10:14 -05:00
Reinier Balt
4a485558e2 Merge branch 'master' into rails4
Conflicts:
	Gemfile.lock
	config/routes.rb
2013-06-17 09:25:02 +02:00
Reinier Balt
56b884055f fix #1270. if start-from fits the recurrence pattern, the first todo should use the start-from date
this is use-case 2 mentioned in the ticket.
2013-06-11 23:38:30 +02:00
Reinier Balt
671f64b419 move to strong_parameters of rails4. 2013-05-27 12:44:31 +02:00
Reinier Balt
ebff4cfc0c start fixing deprecation warnings 2013-05-11 23:13:32 +02:00
Reinier Balt
5cfa115cdc small refactorings
fix passing params in use of _collection
2013-05-03 21:54:03 +02:00
Reinier Balt
5ed69fc1a2 update gems and fix failures from new aasm
I'm not sure the test failures caused by reload not working are caused by the new aasm, 
perhaps the thread isolation is causing that...
2013-04-29 11:53:32 +02:00
Matt Rogers
c4bcc0996f Remove extra whitespace 2013-04-26 16:30:40 -05:00
Matt Rogers
88e7798db6 Rename RecurringTodo#has_next_todo to continues_recurring?
This clarifies the intent of the method.
2013-04-26 16:30:12 -05:00
Matt Rogers
036c34f266 Rename RecurringTodo#inc_occurences to increment_occurrences
This clarifies the method name and fixes a typo.
2013-04-26 16:20:42 -05:00
Matt Rogers & Katrina Owen
a1b270699d Extract creation of todos from recurrings todos 2013-04-25 20:45:14 -05:00
Reinier Balt
885ee7d1d1 refactorings for recurring todo model 2012-07-13 00:31:11 +02:00
Tim Madden
a98f8be279 fixing a broken i18n reference 2012-06-27 13:58:24 -05:00
Reinier Balt
c9d64e6f4b get the first cucumber feature running: calendar 2012-04-30 13:56:42 +02:00
Reinier Balt
13b58f3a10 all unit and functional tests are passing 2012-04-30 13:56:40 +02:00
Reinier Balt
86afd42148 Work in progress: has_many_polymorphs does not work with rails 3.2 because of intrusive changes in rails internals. I think we need to rip out this dependency... 2012-04-30 13:56:34 +02:00
Reinier Balt
b2e6253b4c restore all associations for tags. All tests are passing 2012-04-11 11:37:22 +02:00
Reinier Balt
6aa8b8d2f9 replace new repeating todo form with jquery dialog. And some refactoring 2011-11-17 17:07:55 +01:00
Reinier Balt
4b6aff5502 hopefully fix failing recurring todos test. Timezones are a pain to get right 2011-11-16 22:05:06 +01:00
Reinier Balt
6e97541ab3 make sure toggle_check and deleting of todos, recurring_todos and projects work in the new done views 2011-07-09 17:21:36 +02:00
Reinier Balt
056dbf08a7 remove vendored gem and fix state model. Some old hacks did not work anymore on the newer aasm. reverted the hacks and fixed some tests 2011-06-10 23:17:22 +02:00
Stefan Richter
00819ce27b migrating to aasm - code part 2011-06-10 23:17:19 +02:00
Reinier Balt
f05826d07a fix #1169 and also improve i18n on repeating todos 2011-05-08 20:37:47 +02:00
Reinier Balt
bf15175c7b fix #895 by clearing the repeat pattern from todos before the pattern is deleted
cherry-picked from 1.7branch
2010-08-19 11:28:34 +02:00
Reinier Balt
3d75cd2457 Fix #1045. The tests broke because of this fix cfc6d117b8. This exposed a new corner case that I fixed and created a test for. Also a small refactoring. 2010-07-29 16:37:22 +02:00
Reinier Balt
cfc6d117b8 fix #1027. Several tests were broken because of the more strict validations on the recurring_todo model 2010-05-13 18:24:26 +02:00
Reinier Balt
5c25e4569e fix #1002. every nth week was off by one week for recurring weekly todos. Thanks Thomas for spotting this.
Updated the wrong test too.
2010-05-02 18:16:29 +02:00
Reinier Balt
8bc3a484b2 fix 1018. Added validations for the recurring target of recurring todos 2010-05-02 16:41:45 +02:00
Reinier Balt
06ac3067d3 fix validations for daily pattern and fix disappearing target fields for recurring todos 2010-04-23 17:13:03 +02:00
Reinier Balt
38f0cf1b7a adds extensive validation to recurring todos. Fixes #967 2010-04-23 16:51:35 +02:00
Reinier Balt
33af53c313 make sure tracks does not crash on missing every_other2 for recurring todos 2010-04-19 14:05:02 +02:00
Reinier Balt
e15425d546 if every_other1 is not filled in for recurring patterns, things start to fall apart. Added basic checks. 2010-04-14 09:15:02 +02:00
Reinier Balt
c3b3e3ea04 Manual apply fix from 1.7_branch. Preserve database integrity for recurring todos when deleting project or context. Fixes #880. Fixes #895 2010-04-04 18:20:07 +02:00
piglop
4e1e18da0f fixed #781:
* added a "show always" radio to the recurring todo forms
* added a show_always flag to recurring todos
* created a migration to convert existing recurring todos where show_from_delta==0
* recurring todos where show_from_delta is 0 are now shown the same day they're due

Signed-off-by: Reinier Balt <lrbalt@gmail.com>
2009-06-03 01:36:20 +08:00
Reinier Balt
239b38cb15 fix for the two issues in #852
* the end date is prefilled with an incorrect formatted date
* if the radio for ends_on is not selected, but a date is entered, tracks incorrectly behaves as if ends_on was checked
2009-04-01 13:51:36 +02:00
Reinier Balt
0e68ded56a fix tags and fix tests 2008-12-22 23:26:38 +01:00
Reinier Balt
c618d35d3a first pass at restoring tag functionality 2008-12-22 20:55:32 +01:00
Reinier Balt
c5598a94ee fix small bug where a check was done on a wrong value 2008-12-18 10:17:16 +01:00
Reinier Balt
c46e5a9e1d show recurrence pattern in :title of a recurring todo. Needed slight refactoring to make it happen 2008-12-08 16:59:10 +01:00
Reinier Balt
9d246f70cd Fix #795.
Similar hack as f43447e33f
2008-11-29 15:55:16 +01:00
Reinier Balt
4a98ee5669 several fixes to recurring todos and adds some named_scopes
fixes case where unmarking a complete todo which belongs to a recurring pattern results in two todos that both keep on recurring. With this fix a new todo will only be created when there are no active todos left belonging to that recurring pattern

fixes tests that failed because of previous commits

adds some named_scopes, inspired by http://railscasts.com/episodes/108
2008-11-28 16:39:50 +01:00
Reinier Balt
f43447e33f added workaround for strange timezone behaviour 2008-11-27 15:48:20 +01:00
Reinier Balt
a3f23c60e4 fixes #786 where timezone handling of RoR screwed the algorithm to find the last sunday of march in 2009
Fix is a bit of a hack, see #786 for futher explanation.
2008-10-22 10:16:31 +02:00
Reinier Balt
ce671f23f4 fix bug introduced by last commit and add test for it
also refactor check_for_next_todo a bit to depend less on globals
2008-10-14 22:49:17 +02:00