diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-06-10 06:00:18 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-06-10 06:00:18 +0000 |
commit | 92bc4919eb1b74a6a993b08c4715e7c7bba48b18 (patch) | |
tree | 65f297450402859afbac63ad629237d4ed5a31f6 /app | |
parent | c103a59465cdf3d49988207c574cdc22655e2e3e (diff) | |
download | redmine-92bc4919eb1b74a6a993b08c4715e7c7bba48b18.tar.gz redmine-92bc4919eb1b74a6a993b08c4715e7c7bba48b18.zip |
Merged r17373 to 3.4-stable (#28649).
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@17374 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/issue.rb | 7 | ||||
-rw-r--r-- | app/models/issue_relation.rb | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 038a6accd..1f2f39fa8 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1301,7 +1301,7 @@ class Issue < ActiveRecord::Base # Reschedules the issue on the given date or the next working day and saves the record. # If the issue is a parent task, this is done by rescheduling its subtasks. - def reschedule_on!(date) + def reschedule_on!(date, journal=nil) return if date.nil? if leaf? || !dates_derived? if start_date.nil? || start_date != date @@ -1309,6 +1309,9 @@ class Issue < ActiveRecord::Base # Issue can not be moved earlier than its soonest start date date = [soonest_start(true), date].compact.max end + if journal + init_journal(journal.user) + end reschedule_on(date) begin save @@ -1791,7 +1794,7 @@ class Issue < ActiveRecord::Base def reschedule_following_issues if start_date_changed? || due_date_changed? relations_from.each do |relation| - relation.set_issue_to_dates + relation.set_issue_to_dates(@current_journal) end end end diff --git a/app/models/issue_relation.rb b/app/models/issue_relation.rb index d38825ea6..f23f74478 100644 --- a/app/models/issue_relation.rb +++ b/app/models/issue_relation.rb @@ -176,10 +176,10 @@ class IssueRelation < ActiveRecord::Base set_issue_to_dates end - def set_issue_to_dates + def set_issue_to_dates(journal=nil) soonest_start = self.successor_soonest_start if soonest_start && issue_to - issue_to.reschedule_on!(soonest_start) + issue_to.reschedule_on!(soonest_start, journal) end end |