From 8e3d1b694ab47317638b474082cb70e08a8d02e7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 13 Mar 2010 14:56:49 +0000 Subject: Adds subtasking (#443) including: * priority, start/due dates, progress, estimate, spent time roll-up to parent issues * descendant issues tree displayed on the issue view with context menu support * issue tree display on the gantt chart * issue tree copy on project copy * unlimited nesting Defining subtasks requires the new permission 'Manage subtasks'. Subtasks can not belong to a different project than the parent task. Implementation is based on scoped nested sets for fast reads and updates. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3573 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb | 7 +++++++ vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'vendor') diff --git a/vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb b/vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb index a5598dbd2..01a61bf48 100644 --- a/vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb +++ b/vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb @@ -77,6 +77,13 @@ module Redmine @custom_field_values = nil end + def reset_custom_values! + @custom_field_values = nil + @custom_field_values_changed = true + values = custom_values.inject({}) {|h,v| h[v.custom_field_id] = v.value; h} + custom_values.each {|cv| cv.destroy unless custom_field_values.include?(cv)} + end + module ClassMethods end end diff --git a/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb b/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb index 6be3c5e42..9c4ee0f22 100644 --- a/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb +++ b/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb @@ -256,7 +256,7 @@ module CollectiveIdea #:nodoc: end def leaf? - right - left == 1 + new_record? || (right - left == 1) end # Returns true is this is a child node -- cgit v1.2.3