Actualiza a Redmine 3.4.13
This commit is contained in:
parent
807ff3308d
commit
ecddcaf1d3
224 changed files with 2222 additions and 1000 deletions
|
@ -275,7 +275,8 @@ class Issue < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
unless options[:watchers] == false
|
||||
self.watcher_user_ids = issue.watcher_user_ids.dup
|
||||
self.watcher_user_ids =
|
||||
issue.watcher_users.select{|u| u.status == User::STATUS_ACTIVE}.map(&:id)
|
||||
end
|
||||
@copied_from = issue
|
||||
@copy_options = options
|
||||
|
@ -1086,7 +1087,7 @@ class Issue < ActiveRecord::Base
|
|||
if leaf?
|
||||
estimated_hours
|
||||
else
|
||||
@total_estimated_hours ||= self_and_descendants.sum(:estimated_hours)
|
||||
@total_estimated_hours ||= self_and_descendants.visible.sum(:estimated_hours)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1300,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
|
||||
|
@ -1308,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
|
||||
|
@ -1631,6 +1635,8 @@ class Issue < ActiveRecord::Base
|
|||
copy.author = author
|
||||
copy.project = project
|
||||
copy.parent_issue_id = copied_issue_ids[child.parent_id]
|
||||
copy.fixed_version_id = nil unless child.fixed_version.present? && child.fixed_version.status == 'open'
|
||||
copy.assigned_to = nil unless child.assigned_to_id.present? && child.assigned_to.status == User::STATUS_ACTIVE
|
||||
unless copy.save
|
||||
logger.error "Could not copy subtask ##{child.id} while copying ##{@copied_from.id} to ##{id} due to validation errors: #{copy.errors.full_messages.join(', ')}" if logger
|
||||
next
|
||||
|
@ -1789,7 +1795,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue