Sorting journals by date to ensure proper calculations

Postgres does not deliver them in proper order by default
Conflicts:

	app/models/burndown.rb
pull/6827/head
Gregor Schmidt 13 years ago
parent a4cb3f3a2b
commit 6b5a5ca645
  1. 2
      app/models/burndown.rb

@ -137,7 +137,7 @@ class Burndown
#
def details_by_property(story)
details = story.journals.collect(&:details).flatten.select{ |d| collect_names.include?(d.prop_key) || out_names.include?(d.prop_key)}
details = story.journals.sort_by(&:created_on).collect(&:details).flatten.select{ |d| collect_names.include?(d.prop_key) || out_names.include?(d.prop_key)}
details.group_by { |d| d.prop_key }
end

Loading…
Cancel
Save