diff --git a/app/models/build_list.rb b/app/models/build_list.rb index 50ceccc24..cadcd0de7 100644 --- a/app/models/build_list.rb +++ b/app/models/build_list.rb @@ -121,7 +121,7 @@ class BuildList < ActiveRecord::Base } scope :scoped_to_project_name, lambda {|project_name| joins(:project).where('projects.name LIKE ?', "%#{project_name}%") if project_name.present? } scope :scoped_to_new_core, lambda {|new_core| where(:new_core => new_core)} - scope :outdated, where("#{table_name}.created_at < ? AND #{table_name}.status <> ? OR #{table_name}.created_at < ?", Time.now - LIVE_TIME, BUILD_PUBLISHED, Time.now - MAX_LIVE_TIME) + scope :outdated, where("#{table_name}.created_at < ? AND #{table_name}.status NOT IN (?) OR #{table_name}.created_at < ?", Time.now - LIVE_TIME, [BUILD_PUBLISHED,BUILD_PUBLISHED_INTO_TESTING], Time.now - MAX_LIVE_TIME) scope :published_container, where(:container_status => BUILD_PUBLISHED) serialize :additional_repos diff --git a/app/views/projects/build_lists/show.json.jbuilder b/app/views/projects/build_lists/show.json.jbuilder index 73823350f..4a9b46b16 100644 --- a/app/views/projects/build_lists/show.json.jbuilder +++ b/app/views/projects/build_lists/show.json.jbuilder @@ -11,7 +11,7 @@ json.build_list do end json.can_publish can?(:publish, @build_list) - json.can_publish_into_testing can?(:can_publish_into_testing, @build_list) && @build_list.can_publish_into_testing? + json.can_publish_into_testing can?(:publish_into_testing, @build_list) && @build_list.can_publish_into_testing? json.can_cancel @build_list.can_cancel? json.can_create_container @build_list.can_create_container? json.can_reject_publish @build_list.can_reject_publish?