diff --git a/app/models/protocol.rb b/app/models/protocol.rb index dd10997a4..8f4049561 100644 --- a/app/models/protocol.rb +++ b/app/models/protocol.rb @@ -372,7 +372,7 @@ class Protocol < ActiveRecord::Base end def completed_steps - steps.select(&:completed) + steps.where(completed: true) end def space_taken diff --git a/config/initializers/extends/report_extends.rb b/config/initializers/extends/report_extends.rb index d243c6bb0..3245d8af0 100644 --- a/config/initializers/extends/report_extends.rb +++ b/config/initializers/extends/report_extends.rb @@ -52,7 +52,7 @@ module ReportExtends true, [:step], proc do |my_module| - my_module.protocol.completed_steps + my_module.protocol.completed_steps.order(:position) end), ModuleElement.new(:result_assets, true,