From 96e01c6d4a5788213deb215f88e8f0a3c3f8e857 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 24 Nov 2012 15:09:51 +0000 Subject: [PATCH] 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 --- app/models/issue.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- 2.39.5