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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
feature/63646 Remove `work_package_comment_id_url` feature flag (#18740)
Kabiru Mwenja700166f99381
diff --git a/.github/workflows/pullpreview.yml b/.github/workflows/pullpreview.ymlindex 3396cbe311c..aba0a76f525 100644--- a/.github/workflows/pullpreview.yml+++ b/.github/workflows/pullpreview.yml@@ -34,7 +34,6 @@ jobs:echo "OPENPROJECT_LOOKBOOK__ENABLED=true" >> .env.pullpreviewecho "OPENPROJECT_HSTS=false" >> .env.pullpreviewecho "OPENPROJECT_NOTIFICATIONS_POLLING_INTERVAL=10000" >> .env.pullpreview- echo "OPENPROJECT_FEATURE_WORK_PACKAGE_COMMENT_ID_URL_ACTIVE=true" >> .env.pullpreview- name: Boot as BIM editionif: 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.erbindex 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 @@endendheader_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)endendheader_container.with_column(flex_layout: true, align_items: :center) do |header_end_container|@@ -95,12 +91,6 @@endend- 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.rbindex 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 WorkPackagesdef 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)endenddef 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)endenddef 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)endend@@ -199,17 +190,6 @@ module WorkPackagesendend- 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_labelif 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.sassindex 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-iconcolor: 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 descriptionsdiff --git a/app/components/work_packages/activities_tab/shared_helpers.rb b/app/components/work_packages/activities_tab/shared_helpers.rbindex 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)endend@@ -72,15 +72,11 @@ module WorkPackagesenddef activity_anchor_name- OpenProject::FeatureDecisions.work_package_comment_id_url_active? ? "comment" : "activity"+ "comment"enddef journal_activity_id(journal)- if OpenProject::FeatureDecisions.work_package_comment_id_url_active?- journal.id- else- journal.sequence_version- end+ journal.idendendenddiff --git a/config/initializers/feature_decisions.rb b/config/initializers/feature_decisions.rbindex 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.rbindex 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 dowait_for_auto_scrolling_to_finishactivity_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))endend- context "with #comment- anchor", with_flag: { work_package_comment_id_url: true } do+ context "with #comment- anchor" dobefore dovisit 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 doendend- context "when on mobile screen size", with_flag: { work_package_comment_id_url: true } do+ context "when on mobile screen size" dobefore dopage.current_window.resize_to(500, 1000)@@ -1086,11 +1086,11 @@ RSpec.describe "Work package activity", :js, :with_cuprite dowait_for_auto_scrolling_to_finishactivity_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))endend- context "with #comment- anchor", with_flag: { work_package_comment_id_url: true } do+ context "with #comment- anchor" dobefore dovisit project_work_package_path(project, work_package.id, "activity", anchor: "comment-#{comment_1.id}")wp_page.wait_for_activity_tab