From: Jean-Philippe Lang Date: Sat, 24 Nov 2012 15:09:51 +0000 (+0000) Subject: Fixed the behaviour for when rescheduling a parent task (#4590). X-Git-Tag: 2.2.0~39 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=96e01c6d4a5788213deb215f88e8f0a3c3f8e857;p=redmine.git Fixed the behaviour for when rescheduling a parent task (#4590). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10880 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/issue.rb b/app/models/issue.rb index f591f778b..4b60843c7 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -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