summaryrefslogtreecommitdiffstats
path: root/app/models/issue_relation.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-03-13 15:29:34 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-03-13 15:29:34 +0000
commitd550c46160deb2b9bca12a75f315afdd18cfbdfa (patch)
treeaaebe04473fbbe1fdd332fba29a0ad816c4ea6f5 /app/models/issue_relation.rb
parent8e3d1b694ab47317638b474082cb70e08a8d02e7 (diff)
downloadredmine-d550c46160deb2b9bca12a75f315afdd18cfbdfa.tar.gz
redmine-d550c46160deb2b9bca12a75f315afdd18cfbdfa.zip
Makes subtasks rescheduled when a 'precedes' relation is set on a parent task.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3574 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_relation.rb')
-rw-r--r--app/models/issue_relation.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/issue_relation.rb b/app/models/issue_relation.rb
index 2c110a72f..a28175d48 100644
--- a/app/models/issue_relation.rb
+++ b/app/models/issue_relation.rb
@@ -73,9 +73,8 @@ class IssueRelation < ActiveRecord::Base
def set_issue_to_dates
soonest_start = self.successor_soonest_start
- if soonest_start && (!issue_to.start_date || issue_to.start_date < soonest_start)
- issue_to.start_date, issue_to.due_date = successor_soonest_start, successor_soonest_start + issue_to.duration
- issue_to.save
+ if soonest_start
+ issue_to.reschedule_after(soonest_start)
end
end