Skip to content

[#74769] Remove portfolio_models feature flag#23182

Merged
toy merged 4 commits into
devfrom
code-maintenance/74769-remove-portfolio_models-feature-flag
May 28, 2026
Merged

[#74769] Remove portfolio_models feature flag#23182
toy merged 4 commits into
devfrom
code-maintenance/74769-remove-portfolio_models-feature-flag

Conversation

@toy
Copy link
Copy Markdown
Contributor

@toy toy commented May 12, 2026

Ticket

https://community.openproject.org/wp/74769

What are you trying to accomplish?

Remove the force active flag

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@toy toy force-pushed the code-maintenance/74769-remove-portfolio_models-feature-flag branch from c1b2f36 to 77a695c Compare May 13, 2026 12:18
Copy link
Copy Markdown
Contributor

@EinLama EinLama left a comment

Choose a reason for hiding this comment

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

Glad to see so many branches of conditionals removed. If CI green, I am green 😁

@toy toy force-pushed the code-maintenance/74769-remove-portfolio_models-feature-flag branch 4 times, most recently from a6ae9d1 to fe8bc84 Compare May 19, 2026 19:27
@toy toy force-pushed the code-maintenance/74769-remove-portfolio_models-feature-flag branch 3 times, most recently from 575223a to af2bc7a Compare May 27, 2026 18:07
@toy toy requested review from EinLama and Copilot May 27, 2026 19:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the portfolio_models feature flag (previously force-active) and simplifies backend/API, frontend, and test code paths to assume portfolio/program workspaces are always available (subject to permissions/EE checks).

Changes:

  • Removes portfolio_models feature-decision registration and all runtime guards (guard_feature_flag, controller before_action, menu/permission visibility checks).
  • Updates frontend UI to always render portfolio/program workspace labels/badges and removes feature-flag-dependent copy/controls.
  • Cleans up/adjusts specs and page objects to no longer toggle the removed feature flag and to select workspace types explicitly when creating.

Reviewed changes

Copilot reviewed 44 out of 44 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
spec/support/pages/projects/index.rb Updates workspace creation helper to select a specific workspace type (button vs add-menu).
spec/requests/api/v3/programs/update_resource_spec.rb Removes feature-flag gating contexts for program update endpoint specs.
spec/requests/api/v3/programs/update_form_resource_spec.rb Removes feature-flag gating contexts for program update-form endpoint specs.
spec/requests/api/v3/programs/show_resource_spec.rb Simplifies show specs by removing feature-flag contexts.
spec/requests/api/v3/programs/index_resource_spec.rb Simplifies index specs by removing feature-flag contexts.
spec/requests/api/v3/programs/delete_resource_spec.rb Removes feature-flag gating contexts for program delete endpoint specs.
spec/requests/api/v3/portfolios/update_resource_spec.rb Removes feature-flag gating contexts for portfolio update endpoint specs.
spec/requests/api/v3/portfolios/update_form_resource_spec.rb Removes feature-flag gating contexts for portfolio update-form endpoint specs.
spec/requests/api/v3/portfolios/show_resource_spec.rb Simplifies show specs by removing feature-flag contexts.
spec/requests/api/v3/portfolios/index_resource_spec.rb Simplifies index specs by removing feature-flag contexts.
spec/requests/api/v3/portfolios/delete_resource_spec.rb Removes feature-flag gating contexts for portfolio delete endpoint specs.
spec/features/work_packages/table/edit_work_packages_spec.rb Removes feature-flag enabling for workspace-type-related UI behavior.
spec/features/projects/project_autocomplete_spec.rb Removes feature-flag enabling for workspace badges in autocomplete.
spec/features/projects/navigation_spec.rb Removes feature-flag enabling for workspace badges in project dropdown.
spec/features/projects/lists/table_spec.rb Removes feature-flag enabling for workspace badges in project list table.
spec/features/projects/edit_settings_spec.rb Removes feature-flag enabling for workspace badges in “Subproject of” field.
spec/features/projects/create_spec.rb Adjusts project creation tests to use updated workspace creation helper (via add-menu).
spec/features/programs/create_spec.rb Removes feature-flag usage and selects :program workspace creation explicitly.
spec/features/portfolios/index_spec.rb Removes feature-flag gating contexts from portfolios index feature specs.
spec/features/portfolios/create_spec.rb Removes feature-flag usage and selects :portfolio workspace creation explicitly.
spec/features/menu_items/top_menu_item_spec.rb Removes “Projects” top-menu behavior specs tied to the removed flag.
spec/features/global_roles/global_create_project_spec.rb Updates global role specs to reflect always-on workspace model behavior.
spec/controllers/projects_controller_spec.rb Removes feature-flag gating from controller specs.
spec/controllers/programs_controller_spec.rb Removes feature-flag gating from programs controller specs.
spec/controllers/portfolios_controller_spec.rb Removes feature-flag gating from portfolios controller specs.
spec/components/projects/index_sub_header_component_spec.rb Adjusts subheader component specs to assert behavior without feature-flag contexts.
lib/api/v3/programs/programs_api.rb Removes API guard that blocked programs endpoints behind portfolio_models.
lib/api/v3/portfolios/portfolios_api.rb Removes API guard that blocked portfolios endpoints behind portfolio_models.
frontend/src/app/shared/components/header-project-select/list/header-project-select-list.component.ts Removes feature-flag dependency and related config injection.
frontend/src/app/shared/components/header-project-select/list/header-project-select-list.component.html Always renders workspace type descriptions for Portfolio/Program entries.
frontend/src/app/shared/components/header-project-select/header-project-select.component.ts Removes feature-flag dependency and simplifies text selection to “workspace” terminology.
frontend/src/app/shared/components/header-project-select/header-project-select.component.html Removes legacy action bar that was only shown when the flag was disabled.
frontend/src/app/shared/components/autocompleter/project-autocompleter/project-autocompleter-template.component.ts Removes feature-flag dependency and related config injection.
frontend/src/app/shared/components/autocompleter/project-autocompleter/project-autocompleter-template.component.html Always renders workspace type descriptions for Portfolio/Program entries.
config/locales/js-en.yml Removes JS translation keys previously used for legacy “project-only” UI strings.
config/initializers/permissions.rb Removes feature-flag-based visibility constraints for add_portfolios/add_programs permissions.
config/initializers/menus.rb Removes feature-flag checks from portfolio menu visibility conditions.
config/initializers/feature_decisions.rb Removes portfolio_models feature decision registration.
app/controllers/projects_controller.rb Removes feature-flag authorization helper now that the flag is gone.
app/controllers/programs_controller.rb Removes feature-flag before_action.
app/controllers/portfolios/menus_controller.rb Removes feature-flag before_action and helper.
app/controllers/portfolios_controller.rb Removes feature-flag before_action.
app/components/projects/row_component.rb Always allows workspace type badges for portfolio/program workspaces.
app/components/projects/index_sub_header_component.rb Always includes portfolio/program types in allowed-new-workspace logic based on permissions only.

Comment thread config/locales/js-en.yml
Comment thread spec/requests/api/v3/portfolios/update_resource_spec.rb
@toy toy force-pushed the code-maintenance/74769-remove-portfolio_models-feature-flag branch from af2bc7a to 1d5b812 Compare May 28, 2026 12:01
@toy toy requested a review from Copilot May 28, 2026 12:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 44 out of 44 changed files in this pull request and generated 1 comment.

Copy link
Copy Markdown
Contributor

@EinLama EinLama left a comment

Choose a reason for hiding this comment

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

LGTM and now it's also green ✅

@toy toy merged commit c5df0c2 into dev May 28, 2026
24 of 26 checks passed
@toy toy deleted the code-maintenance/74769-remove-portfolio_models-feature-flag branch May 28, 2026 15:20
@github-actions github-actions Bot locked and limited conversation to collaborators May 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants