Merge branch '2.1' of github.com:relaxdiego/redmine_backlogs into 2.1

pull/6827/head
Mark Maglana 15 years ago
commit 8c9d99b3e5
  1. 12
      app/models/sprint.rb
  2. 2
      lib/issue_patch.rb

@ -119,8 +119,7 @@ class Sprint < Version
}
datasets = {}
[ [:points_committed, :points],
[:points_resolved, :points],
[ [:points_resolved, :points],
[:points_accepted, :points],
[:remaining_hours, :hours],
[:required_burn_rate_points, :points],
@ -131,6 +130,15 @@ class Sprint < Version
end
}
data = datapoints.collect {|d| d[:points_committed]}
if not data.select{|d| d != data[0]}.empty?
datasets[:points_committed] = { :units => :points, :series => data }
end
if datasets.has_key?(:points_resolved) and datasets.has_key?(:points_accepted) and datasets[:points_resolved][:series] == datasets[:points_accepted][:series]
datasets.delete(:points_resolved)
end
return { :dates => self.days, :series => datasets, :max => {:points => max_points, :hours => max_hours} }
end

@ -22,7 +22,7 @@ module IssuePatch
newissue = move_to_project_without_transaction_without_autolink(new_project, new_tracker, options)
if self.project_id == newissue.project_id and self.is_story? and newissue.is_story? and self.id != newissue.id
relation = IssueRelation.new :relation_type => IssueRelation::TYPE_RELATES
relation = IssueRelation.new :relation_type => IssueRelation::TYPE_DUPLICATES
relation.issue_from = self
relation.issue_to = newissue
relation.save

Loading…
Cancel
Save