From 1a7841ffdb131eee9f63e22346e0a8f6fe9c4064 Mon Sep 17 00:00:00 2001 From: Christoph Wagner Date: Fri, 27 Dec 2019 16:47:18 -0800 Subject: [PATCH 1/3] Fix projects#index not working properly during season transition - If any past or current season is selected, only show selected projects for that season - If an upcoming season was selected, show non-rejected projects - If no season was selected, show selected projects for the current season - If no season was selected, and the current season is in transition, show non-rejected projects --- app/controllers/projects_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 8a743b546..0209144c8 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -25,11 +25,11 @@ def edit end def index - season = Season.find_by(name: params['filter']) || Season.current - @projects = if season.current? and !season.active? - Project.in_current_season.not_rejected + season = Season.find_by(name: params['filter']) + @projects = if season && season.started? || !Season.current.transition? + Project.selected(season: season || Season.current) else - Project.selected(season: season) + Project.in_current_season.not_rejected end end From 6403a7ae900727838f2a65ba4f0303a59a9e174f Mon Sep 17 00:00:00 2001 From: Christoph Wagner Date: Fri, 27 Dec 2019 16:57:42 -0800 Subject: [PATCH 2/3] Use safe navigation --- app/controllers/projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 0209144c8..d00ebc541 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -26,7 +26,7 @@ def edit def index season = Season.find_by(name: params['filter']) - @projects = if season && season.started? || !Season.current.transition? + @projects = if season&.started? || !Season.current.transition? Project.selected(season: season || Season.current) else Project.in_current_season.not_rejected From 29454e5d27e0bf3f9c38ef3f71ea126cbe37b888 Mon Sep 17 00:00:00 2001 From: Christoph Wagner Date: Thu, 2 Jan 2020 10:05:49 -0800 Subject: [PATCH 3/3] Fix error in Travis build environment --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7c047628d..2970497ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ before_install: - sudo apt-get install chromium-chromedriver - gem update --system - gem --version - - gem install bundler + - gem install bundler -v 1.17.3 before_script: - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter