diff --git a/app/controllers/rb_master_backlogs_controller.rb b/app/controllers/rb_master_backlogs_controller.rb index b757e68a28..2b8261869d 100644 --- a/app/controllers/rb_master_backlogs_controller.rb +++ b/app/controllers/rb_master_backlogs_controller.rb @@ -7,11 +7,12 @@ class RbMasterBacklogsController < RbApplicationController product_backlog_stories = Story.product_backlog(@project) sprints = Sprint.open_sprints(@project) - @last_update = Story.find( + last_story = Story.find( :first, :conditions => ["project_id=? AND tracker_id in (?)", @project, Story.trackers], :order => "updated_on DESC" - ).updated_on + ) + @last_update = (last_story ? last_story.updated_on : nil) @product_backlog = { :sprint => nil, :stories => product_backlog_stories } @sprint_backlogs = sprints.map{ |s| { :sprint => s, :stories => s.stories } }