diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ecca00727..3aeeb4e2f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -151,6 +151,14 @@ We sometimes use the button native Dom element to programmatically click, as the - Fixed rubocop errors after Bootstrap upgrade - Fixed RSpec tests after Bootstrap upgrade - Fix "undefined" Tooltip Messages [#3364](https://github.com/DMPRoadmap/roadmap/pull/3364) +- Fixed rubocop errors after V4.1.1 release +- Fixed MySQL and PostgreSQL GitHub Actions [PR #3376](https://github.com/DMPRoadmap/roadmap/pull/3376) + - Removed duplicate `node-version:` statements from the `mysql.yml` and `postgres.yml` workflows + - Replaced `webdrivers` gem with `selenium-webdriver` gem + - Disabled `rack-attack` gem from throttling `/users/sign_in` path in Rails test environment + - Addressed `Faker` deprecation warnings + - Made some small changes to fix some existing tests +- Prevent Duplicate Options in 'Select Guidance' [PR #3365](https://github.com/DMPRoadmap/roadmap/pull/3365) ## V4.1.1 diff --git a/app/controllers/plans_controller.rb b/app/controllers/plans_controller.rb index 421514001a..e3da35eae0 100644 --- a/app/controllers/plans_controller.rb +++ b/app/controllers/plans_controller.rb @@ -192,10 +192,10 @@ def show end @default_orgs = Org.default_orgs @all_ggs_grouped_by_org.each do |org, ggs| - @important_ggs << [org, ggs] if @default_orgs.include?(org) - - # If this is one of the already selected guidance groups its important! - @important_ggs << [org, ggs] if !(ggs & @selected_guidance_groups).empty? && !@important_ggs.include?([org, ggs]) + # @default_orgs and already selected guidance groups are important. + if (@default_orgs.include?(org) || (ggs & @selected_guidance_groups).any?) && !@important_ggs.include?([org, ggs]) + @important_ggs << [org, ggs] + end end # Sort the rest by org name for the accordion