Skip to content

Commit

Permalink
Remove feature flag for meetings
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Feb 3, 2025
1 parent 9446f6a commit 811a5d9
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 50 deletions.
3 changes: 0 additions & 3 deletions config/initializers/feature_decisions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
description: "Allows to generate a PDF document from a work package description. " \
"See #45896 for details."

OpenProject::FeatureDecisions.add :recurring_meetings,
description: "Differentiate between one-time and recurring meetings."

OpenProject::FeatureDecisions.add :generate_work_package_subjects,
description: "Allows the configuration for work package types to have " \
"automatically generated work package subjects."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,20 @@
I18n.t(:label_meeting)
end

if OpenProject::FeatureDecisions.recurring_meetings_active?
menu.with_item(label: I18n.t("meeting.types.one_time"),
tag: :a,
href: new_dialog_meetings_path(project_id: @project&.id, type: :structured),
content_arguments: { data: { controller: "async-dialog" }}
) do |item|
item.with_description.with_content(t("meeting.types.structured_text"))
end
menu.with_item(label: I18n.t("meeting.types.one_time"),
tag: :a,
href: new_dialog_meetings_path(project_id: @project&.id, type: :structured),
content_arguments: { data: { controller: "async-dialog" } }
) do |item|
item.with_description.with_content(t("meeting.types.structured_text"))
end

menu.with_item(label: I18n.t("meeting.types.recurring"),
tag: :a,
href: new_dialog_meetings_path(project_id: @project&.id, type: :recurring),
content_arguments: { data: { controller: "async-dialog" }}
) do |item|
item.with_description.with_content(t("meeting.types.recurring_text"))
end
else
menu.with_item(label: I18n.t("meeting.types.structured"),
tag: :a,
href: new_dialog_meetings_path(project_id: @project&.id, type: :structured),
content_arguments: { data: { controller: "async-dialog" }}
) do |item|
item.with_description.with_content(t("meeting.types.structured_text"))
end
menu.with_item(label: I18n.t("meeting.types.recurring"),
tag: :a,
href: new_dialog_meetings_path(project_id: @project&.id, type: :recurring),
content_arguments: { data: { controller: "async-dialog" } }
) do |item|
item.with_description.with_content(t("meeting.types.recurring_text"))
end

menu.with_item(label: I18n.t("meeting.types.classic"),
Expand Down
12 changes: 2 additions & 10 deletions modules/meeting/app/menus/meetings/menu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def initialize(params:, project: nil)
def menu_items
[
OpenProject::Menu::MenuGroup.new(header: nil, children: top_level_menu_items),
meeting_series_menu_group,
OpenProject::Menu::MenuGroup.new(header: I18n.t(:label_meeting_series), children: meeting_series_menu_items),
OpenProject::Menu::MenuGroup.new(header: I18n.t(:label_involvement), children: involvement_sidebar_menu_items)
].compact
end
Expand All @@ -49,13 +49,7 @@ def top_level_menu_items
recurring_menu_item,
menu_item(title: I18n.t(:label_all_meetings),
query_params: { filters: all_filter })
].compact
end

def meeting_series_menu_group
return unless OpenProject::FeatureDecisions.recurring_meetings_active?

OpenProject::Menu::MenuGroup.new(header: I18n.t(:label_meeting_series), children: meeting_series_menu_items)
]
end

def meeting_series_menu_items
Expand All @@ -80,8 +74,6 @@ def meeting_series_menu_items
end

def recurring_menu_item
return unless OpenProject::FeatureDecisions.recurring_meetings_active?

recurring_filter = [{ type: { operator: "=", values: ["t"] } }].to_json

menu_item(title: I18n.t("label_recurring_meeting_plural"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ def human_name
I18n.t("label_recurring_meeting_part_of")
end

def available?
OpenProject::FeatureDecisions.recurring_meetings_active?
end

def apply_to(query_scope)
if allowed_values.first.intersect?(values)
query_scope.recurring
Expand Down
2 changes: 1 addition & 1 deletion modules/meeting/spec/features/meetings_index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def invite_to_meeting(meeting)
meetings_page.expect_create_new_button
end

it "allows creation of both types of meetings", with_flag: { recurring_meetings: true } do
it "allows creation of both types of meetings" do
meetings_page.visit!

meetings_page.expect_create_new_types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
require_relative "../../support/pages/meetings/index"

RSpec.describe "Recurring meetings creation",
:js,
with_flag: { recurring_meetings: true } do
:js do
include Components::Autocompleter::NgSelectAutocompleteHelpers

shared_let(:project) { create(:project, enabled_module_names: %w[meetings]) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
require_relative "../../support/pages/meetings/index"

RSpec.describe "Recurring meetings CRUD",
:js,
with_flag: { recurring_meetings: true } do
:js do
include Components::Autocompleter::NgSelectAutocompleteHelpers

before_all do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
require_relative "../../support/pages/recurring_meeting/show"
require_relative "../../support/pages/meetings/index"

RSpec.describe "Recurring meetings end series",
:js,
with_flag: { recurring_meetings: true } do
RSpec.describe "Recurring meetings end series", :js do
include Components::Autocompleter::NgSelectAutocompleteHelpers

shared_let(:project) { create(:project, enabled_module_names: %w[meetings]) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
require_relative "../../support/pages/meetings/index"

RSpec.describe "Structured meetings CRUD",
:js,
with_flag: { recurring_meetings: true } do
:js do
include Components::Autocompleter::NgSelectAutocompleteHelpers

shared_let(:project) { create(:project, enabled_module_names: %w[meetings work_package_tracking]) }
Expand Down

0 comments on commit 811a5d9

Please sign in to comment.