Skip to content

Prevent Duplicate Options in 'Select Guidance' - #3365

Merged
benjaminfaure merged 3 commits into
developmentfrom
aaron/issues/3343
Apr 9, 2024
Merged

Prevent Duplicate Options in 'Select Guidance'#3365
benjaminfaure merged 3 commits into
developmentfrom
aaron/issues/3343

Conversation

@aaronskiba

@aaronskiba aaronskiba commented Jan 15, 2024

Copy link
Copy Markdown
Contributor

Fixes #3343

Changes proposed in this PR:

  • This PR addresses the bug where duplicate guidance options were displayed for some plans.
  • Some minor refactoring is done in this PR as well.

Reasoning Behind Changes

  • Prior to this PR, if current_user.org was also a @default_org, then @important_ggs would contain duplicate [org, ggs].
    • commit 4b27071 fixes this issue.
    • commit c6f73c9 addresses a rubocop offence due to the line being too long. Also, !(ggs & @selected_guidance_groups).empty? is changed to (ggs & @selected_guidance_groups).any? (the two statements should evaluate identically in this context).
@aaronskiba aaronskiba linked an issue Jan 24, 2024 that may be closed by this pull request

@johnpinto1 johnpinto1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested code by setting our Digital Curation Centre as default org in config/initializers/_dmproadmap.rb.

# Your organisation name, used in various places throught the application
  config.x.organisation.name = 'Digital Curation Center'
  # Your organisation's abbreviation
  config.x.organisation.abbreviation = 'DCC'

Current development branch duplicates guidance for Digital Curation Centre:
Selection_213

This change gets rid of duplicate:
Selection_214

aaronskiba added a commit that referenced this pull request Mar 26, 2024
aaronskiba added a commit that referenced this pull request Mar 26, 2024
- Prior to this commit, if current_user.org was also a @default_org, then @important_ggs would contain duplicate [org, ggs].
@benjaminfaure
benjaminfaure merged commit 5f5795e into development Apr 9, 2024
@benjaminfaure
benjaminfaure deleted the aaron/issues/3343 branch April 9, 2024 06:03
@benjaminfaure benjaminfaure mentioned this pull request Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants