]> source.dussan.org Git - redmine.git/commitdiff
Fixed the behaviour for when rescheduling a parent task (#4590). 1/head
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 24 Nov 2012 15:09:51 +0000 (15:09 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 24 Nov 2012 15:09:51 +0000 (15:09 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10880 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue.rb

index f591f778b897a30fb71d37d2e5609a1e7a31ca8f..4b60843c7fd23b11381c3b45bcf79100b8b2fc79 100644 (file)
@@ -907,7 +907,15 @@ class Issue < ActiveRecord::Base
       end
     else
       leaves.each do |leaf|
-        leaf.reschedule_on!(date)
+        if leaf.start_date
+          # Only move subtask if it starts at the same date as the parent
+          # or if it starts before the given date
+          if start_date == leaf.start_date || date > leaf.start_date 
+            leaf.reschedule_on!(date)
+          end
+        else
+          leaf.reschedule_on!(date)
+        end
       end
     end
   end