I do not understand why this works for daily but not for weekly repeating todos
This commit is contained in:
Reinier Balt 2014-07-01 22:38:23 +02:00
parent 1df26fd5c5
commit cb8aba80ca
2 changed files with 1 additions and 2 deletions

View file

@ -15,7 +15,6 @@ module RecurringTodos
@pattern = pattern_class.new(user) @pattern = pattern_class.new(user)
@pattern.attributes = @mapped_attributes @pattern.attributes = @mapped_attributes
end end
# build does not add tags. For tags, the recurring todos needs to be saved # build does not add tags. For tags, the recurring todos needs to be saved

View file

@ -52,7 +52,7 @@ module Tracks
if specified_by_name?(object_type) if specified_by_name?(object_type)
object, new_object_created = find_or_create_by_name(relation, object_name(object_type)) object, new_object_created = find_or_create_by_name(relation, object_name(object_type))
# put id of object in @attributes, i.e. set :project_id to project.id # put id of object in @attributes, i.e. set :project_id to project.id
@attributes[object_type.to_s + "_id"] = object.id unless new_object_created @attributes["#{object_type.to_s}_id".to_sym] = object.id unless new_object_created
else else
# find context or project by its id # find context or project by its id
object = attribute_with_id_of(object_type).present? ? relation.find(attribute_with_id_of(object_type)) : nil object = attribute_with_id_of(object_type).present? ? relation.find(attribute_with_id_of(object_type)) : nil