Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

feature/63646 Remove `work_package_comment_id_url` feature flag (#18740)

Kabiru Mwenja700166f99381
diff --git a/.github/workflows/pullpreview.yml b/.github/workflows/pullpreview.yml
index 3396cbe311c..aba0a76f525 100644
--- a/.github/workflows/pullpreview.yml
+++ b/.github/workflows/pullpreview.yml
@@ -34,7 +34,6 @@ jobs:
echo "OPENPROJECT_LOOKBOOK__ENABLED=true" >> .env.pullpreview
echo "OPENPROJECT_HSTS=false" >> .env.pullpreview
echo "OPENPROJECT_NOTIFICATIONS_POLLING_INTERVAL=10000" >> .env.pullpreview
- echo "OPENPROJECT_FEATURE_WORK_PACKAGE_COMMENT_ID_URL_ACTIVE=true" >> .env.pullpreview
- name: Boot as BIM edition
if: contains(github.ref, 'bim/') || contains(github.head_ref, 'bim/')
run: |
diff --git a/app/components/work_packages/activities_tab/journals/item_component.html.erb b/app/components/work_packages/activities_tab/journals/item_component.html.erb
index 0123bbb33f0..79ae87b2ba2 100644
--- a/app/components/work_packages/activities_tab/journals/item_component.html.erb
+++ b/app/components/work_packages/activities_tab/journals/item_component.html.erb
@@ -59,11 +59,7 @@
end
end
header_start_container.with_column(mr: 1, classes: "hidden-for-mobile") do
- if OpenProject::FeatureDecisions.work_package_comment_id_url_active?
- activity_anchor_link(journal) { journal_updated_at_formatted_time(journal) }
- else
- journal_updated_at_formatted_time(journal)
- end
+ activity_anchor_link(journal)
end
end
header_container.with_column(flex_layout: true, align_items: :center) do |header_end_container|
@@ -95,12 +91,6 @@
end
end
- unless OpenProject::FeatureDecisions.work_package_comment_id_url_active?
- header_end_container.with_column do
- activity_anchor_link(journal)
- end
- end
-
header_end_container.with_column(
ml: 1,
classes: "work-packages-activities-tab-journals-item-component--action-menu"
diff --git a/app/components/work_packages/activities_tab/journals/item_component/details.rb b/app/components/work_packages/activities_tab/journals/item_component/details.rb
index 09cb9224117..cbb3486d9be 100644
--- a/app/components/work_packages/activities_tab/journals/item_component/details.rb
+++ b/app/components/work_packages/activities_tab/journals/item_component/details.rb
@@ -163,28 +163,19 @@ module WorkPackages
def render_mobile_updated_time(container)
container.with_column do
- if OpenProject::FeatureDecisions.work_package_comment_id_url_active?
- activity_anchor_link(journal) { journal_updated_at_formatted_time(journal) }
- else
- journal_updated_at_formatted_time(journal)
- end
+ activity_anchor_link(journal)
end
end
def render_updated_time(container)
container.with_column(mr: 1, classes: "hidden-for-mobile") do
- if OpenProject::FeatureDecisions.work_package_comment_id_url_active?
- activity_anchor_link(journal) { journal_updated_at_formatted_time(journal) }
- else
- journal_updated_at_formatted_time(journal)
- end
+ activity_anchor_link(journal)
end
end
def render_header_end(header_container)
header_container.with_column(flex_layout: true) do |header_end_container|
render_notification_bubble(header_end_container) if has_unread_notifications
- render_activity_link(header_end_container)
end
end
@@ -199,17 +190,6 @@ module WorkPackages
end
end
- def render_activity_link(container)
- return if OpenProject::FeatureDecisions.work_package_comment_id_url_active?
-
- container.with_column(
- pr: 3,
- classes: "work-packages-activities-tab-journals-item-component-details--activity-link-container"
- ) do
- activity_anchor_link(journal)
- end
- end
-
def icon_aria_label
if journal.initial?
I18n.t("activities.work_packages.activity_tab.created")
diff --git a/app/components/work_packages/activities_tab/journals/item_component/details.sass b/app/components/work_packages/activities_tab/journals/item_component/details.sass
index 9aaa0e6ca65..71508eae033 100644
--- a/app/components/work_packages/activities_tab/journals/item_component/details.sass
+++ b/app/components/work_packages/activities_tab/journals/item_component/details.sass
@@ -49,7 +49,5 @@
color: var(--fgColor-muted, var(--color-fg-subtle))
&--notification-dot-icon
color: var(--bgColor-accent-emphasis)
- &--activity-link-container
- padding-top: 2px
&--journal-detail-description-container
- max-width: 95% // otherwise the stem branch might get too short for long descriptions
\ No newline at end of file
+ max-width: 95% // otherwise the stem branch might get too short for long descriptions
diff --git a/app/components/work_packages/activities_tab/shared_helpers.rb b/app/components/work_packages/activities_tab/shared_helpers.rb
index c56195fc002..9d82ab0391b 100644
--- a/app/components/work_packages/activities_tab/shared_helpers.rb
+++ b/app/components/work_packages/activities_tab/shared_helpers.rb
@@ -49,7 +49,7 @@ module WorkPackages
"work-packages--activities-tab--index-anchor-name-param": activity_anchor_name
}
)) do
- block_given? ? yield : "##{journal_activity_id(journal)}"
+ journal_updated_at_formatted_time(journal)
end
end
@@ -72,15 +72,11 @@ module WorkPackages
end
def activity_anchor_name
- OpenProject::FeatureDecisions.work_package_comment_id_url_active? ? "comment" : "activity"
+ "comment"
end
def journal_activity_id(journal)
- if OpenProject::FeatureDecisions.work_package_comment_id_url_active?
- journal.id
- else
- journal.sequence_version
- end
+ journal.id
end
end
end
diff --git a/config/initializers/feature_decisions.rb b/config/initializers/feature_decisions.rb
index 0a103565628..cc96d6d0033 100644
--- a/config/initializers/feature_decisions.rb
+++ b/config/initializers/feature_decisions.rb
@@ -55,8 +55,3 @@ OpenProject::FeatureDecisions.add :oidc_token_exchange,
description: "Enables the under construction OAuth2 token exchange, allowing " \
"users to interact with storage providers without consenting " \
"in OAuth screens before first use."
-
-OpenProject::FeatureDecisions.add :work_package_comment_id_url,
- description: "Introduced a new WP comment URL identifier structure " \
- "`#comment-<journal-id>` replacing the old " \
- "`#activity-<journal-sequence_number>`."
diff --git a/spec/features/activities/work_package/activities_spec.rb b/spec/features/activities/work_package/activities_spec.rb
index 60a34317fba..96a1c55094c 100644
--- a/spec/features/activities/work_package/activities_spec.rb
+++ b/spec/features/activities/work_package/activities_spec.rb
@@ -1030,11 +1030,11 @@ RSpec.describe "Work package activity", :js, :with_cuprite do
wait_for_auto_scrolling_to_finish
activity_tab.expect_journal_container_at_position(50) # would be at the bottom if no anchor would be provided
- activity_tab.expect_activity_anchor_link(text: "#1")
+ activity_tab.expect_activity_anchor_link(text: format_time(comment_1.updated_at))
end
end
- context "with #comment- anchor", with_flag: { work_package_comment_id_url: true } do
+ context "with #comment- anchor" do
before do
visit project_work_package_path(project, work_package.id, "activity", anchor: "comment-#{comment_1.id}")
wp_page.wait_for_activity_tab
@@ -1052,7 +1052,7 @@ RSpec.describe "Work package activity", :js, :with_cuprite do
end
end
- context "when on mobile screen size", with_flag: { work_package_comment_id_url: true } do
+ context "when on mobile screen size" do
before do
page.current_window.resize_to(500, 1000)
@@ -1086,11 +1086,11 @@ RSpec.describe "Work package activity", :js, :with_cuprite do
wait_for_auto_scrolling_to_finish
activity_tab.expect_journal_container_at_bottom # would be at the top if no anchor would be provided
- activity_tab.expect_activity_anchor_link(text: "#2")
+ activity_tab.expect_activity_anchor_link(text: format_time(comment_2.updated_at))
end
end
- context "with #comment- anchor", with_flag: { work_package_comment_id_url: true } do
+ context "with #comment- anchor" do
before do
visit project_work_package_path(project, work_package.id, "activity", anchor: "comment-#{comment_1.id}")
wp_page.wait_for_activity_tab