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
WIP remove feature flag
Jonas Jabariab51b17f5140
diff --git a/.github/workflows/pullpreview.yml b/.github/workflows/pullpreview.ymlindex 23364897f05..aba0a76f525 100644--- a/.github/workflows/pullpreview.yml+++ b/.github/workflows/pullpreview.yml@@ -33,7 +33,6 @@ jobs:echo "OPENPROJECT_FEATURE__SHOW__CHANGES__ACTIVE=true" >> .env.pullpreviewecho "OPENPROJECT_LOOKBOOK__ENABLED=true" >> .env.pullpreviewecho "OPENPROJECT_HSTS=false" >> .env.pullpreview- echo "OPENPROJECT_FEATURE_PRIMERIZED_WORK_PACKAGE_ACTIVITIES_ACTIVE=true" >> .env.pullpreviewecho "OPENPROJECT_NOTIFICATIONS_POLLING_INTERVAL=10000" >> .env.pullpreview- name: Boot as BIM editionif: contains(github.ref, 'bim/') || contains(github.head_ref, 'bim/')diff --git a/config/initializers/feature_decisions.rb b/config/initializers/feature_decisions.rbindex 4a14e7a891e..1c8150ac96e 100644--- a/config/initializers/feature_decisions.rb+++ b/config/initializers/feature_decisions.rb@@ -39,7 +39,6 @@ require_relative "../../lib_static/open_project/feature_decisions"# OpenProject::FeatureDecisions.add :some_flag# end-OpenProject::FeatureDecisions.add :primerized_work_package_activitiesOpenProject::FeatureDecisions.add :built_in_oauth_applications,description: "Allows the display and use of built-in OAuth applications."diff --git a/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts b/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.tsindex 0979826f650..ef4f799ab2a 100644--- a/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts+++ b/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts@@ -37,7 +37,6 @@ import { IToast, ToastService } from 'core-app/shared/components/toaster/toast.simport {centerUpdatedInPlace,markNotificationsAsRead,- notificationCountIncreased,notificationCountChanged,notificationsMarkedRead,} from 'core-app/core/state/in-app-notifications/in-app-notifications.actions';@@ -63,7 +62,6 @@ import { FrameElement } from '@hotwired/turbo';import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';import { UrlParamsService } from 'core-app/core/navigation/url-params.service';import { IanBellService } from 'core-app/features/in-app-notifications/bell/state/ian-bell.service';-import { ConfigurationService } from 'core-app/core/config/configuration.service';export interface INotificationPageQueryParameters {filter?:string|null;@@ -196,7 +194,6 @@ export class IanCenterService extends UntilDestroyedMixin {readonly deviceService:DeviceService,readonly pathHelper:PathHelperService,readonly ianBellService:IanBellService,- readonly configurationService:ConfigurationService,) {super();this.reload.subscribe();@@ -276,8 +273,6 @@ export class IanCenterService extends UntilDestroyedMixin {*/@EffectCallback(notificationCountChanged)private handleChangedNotificationCount() {- if (!this.primerizedActivitiesEnabled) return;-// update the UI state for increased AND decreased notifications, not only increased count// decreasing the notification count could happen when the user itself// marks notifications as read in the split view or on another tab@@ -290,52 +285,6 @@ export class IanCenterService extends UntilDestroyedMixin {this.reload.next(false);}- /**- * Check for updates after bell count increased- */- @EffectCallback(notificationCountIncreased)- private checkForNewNotifications() {- // There is a new concept for primerized work package activities bound to notificationCountChanged- // See @EffectCallback(notificationCountChanged)- if (this.primerizedActivitiesEnabled) return;-- this.onReload.pipe(take(1)).subscribe((collection) => {- const { activeCollection } = this.query.getValue();- const hasNewNotifications = !collection.ids.reduce(- (allInOldCollection, id) => allInOldCollection && activeCollection.ids.includes(id),- true,- );-- if (!hasNewNotifications) {- return;- }-- if (this.activeReloadToast) {- this.toastService.remove(this.activeReloadToast);- this.activeReloadToast = null;- }-- this.activeReloadToast = this.toastService.add({- type: 'info',- icon: 'bell',- message: this.I18n.t('js.notifications.center.new_notifications.message'),- link: {- text: this.I18n.t('js.notifications.center.new_notifications.link_text'),- target: () => {- this.store.update({ activeCollection: collection });- this.actions$.dispatch(centerUpdatedInPlace({ origin: this.id }));- this.activeReloadToast = null;- },- },- });- });- this.reload.next(false);- }-- private get primerizedActivitiesEnabled():boolean {- return this.configurationService.activeFeatureFlags.includes('primerizedWorkPackageActivities');- }-/*** Reload after notifications were successfully marked as read*/diff --git a/frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.html b/frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.htmlindex 3bff5b7611e..4b5a5faa808 100644--- a/frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.html+++ b/frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.html@@ -1,4 +1,4 @@-<div *ngIf="primerizedActivitiesEnabled" id="work-package-activites-container">+<div id="work-package-activites-container"><turbo-frame [src]="turboFrameSrc" id="work-package-activities-tab-content" loading="lazy"><op-content-loader viewBox="0 0 100 100"><svg:rect x="0" y="0" width="70" height="5" rx="1" />@@ -11,51 +11,3 @@</op-content-loader></turbo-frame></div>--<div *ngIf="!primerizedActivitiesEnabled" id="work-package-activites-container">- <div id="work-package-comment-container">-- <ng-container *ngIf="!showAbove" [ngTemplateOutlet]="template"></ng-container>-- <div- class="work-package--details--long-field work-packages--activity--add-comment hide-when-print"- [ngClass]="{'work-packages--activity--add-comment_top': showAbove} "- #commentContainer- *ngIf="canAddComment"- >- <div class="inline-edit--container inplace-edit">- <edit-form-portal- *ngIf="active"- [schemaInput]="schema"- [changeInput]="change"- [editFieldHandler]="handler"- >- </edit-form-portal>- <div- *ngIf="!active"- (dragover)="startDragOverActivation($event)"- (dragenter)="startDragOverActivation($event)"- >- <button- class="work-package-comment inline-edit--display-field"- [title]="text.editTitle"- (click)="activate()"- >- <span- class="work-package-comment--text"- [textContent]="text.placeholder"- >- </span>-- <op-icon- class="work-package-comment--icon"- icon-classes="icon-edit" [icon-title]="text.editTitle"- ></op-icon>- </button>- </div>- </div>- </div>-- <ng-container *ngIf="showAbove" [ngTemplateOutlet]="template"></ng-container>- </div>-</div>diff --git a/frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.ts b/frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.tsindex c2876c5c038..61d3cc5e682 100644--- a/frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.ts+++ b/frontend/src/app/features/work-packages/components/work-package-comment/work-package-comment.component.ts@@ -84,13 +84,12 @@ export class WorkPackageCommentComponent extends WorkPackageCommentFieldHandlerpublic showAbove:boolean;- public primerizedActivitiesEnabled:boolean;-public turboFrameSrc:string;public htmlId = 'wp-comment-field';- constructor(protected elementRef:ElementRef,+ constructor(+ protected elementRef:ElementRef,protected injector:Injector,protected commentService:CommentService,protected wpLinkedActivities:WorkPackagesActivityService,@@ -111,7 +110,6 @@ export class WorkPackageCommentComponent extends WorkPackageCommentFieldHandlerthis.canAddComment = !!this.workPackage.addComment;this.showAbove = this.configurationService.commentsSortedInDescendingOrder();- this.primerizedActivitiesEnabled = this.configurationService.activeFeatureFlags.includes('primerizedWorkPackageActivities');this.turboFrameSrc = `${this.PathHelper.staticBase}/work_packages/${this.workPackage.id}/activities`;this.commentService.draft$diff --git a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/overview-tab/overview-tab.component.ts b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/overview-tab/overview-tab.component.tsindex 11766a4197b..ea20e3c598b 100644--- a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/overview-tab/overview-tab.component.ts+++ b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/overview-tab/overview-tab.component.ts@@ -32,7 +32,6 @@ import { WorkPackageResource } from 'core-app/features/hal/resources/work-packagimport { I18nService } from 'core-app/core/i18n/i18n.service';import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';import { ApiV3Service } from 'core-app/core/apiv3/api-v3.service';-import { ConfigurationService } from 'core-app/core/config/configuration.service';@Component({templateUrl: './overview-tab.html',@@ -45,13 +44,10 @@ export class WorkPackageOverviewTabComponent extends UntilDestroyedMixin implemepublic tabName = this.I18n.t('js.label_latest_activity');- public primerizedActivitiesEnabled:boolean;-public constructor(readonly I18n:I18nService,readonly $state:StateService,readonly apiV3Service:ApiV3Service,- readonly configurationService:ConfigurationService,) {super();}@@ -59,8 +55,6 @@ export class WorkPackageOverviewTabComponent extends UntilDestroyedMixin implemengOnInit() {this.workPackageId = this.workPackage?.id || this.$state.params.workPackageId as string;- this.primerizedActivitiesEnabled = this.configurationService.activeFeatureFlags.includes('primerizedWorkPackageActivities');-this.apiV3Service.work_packagesdiff --git a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/overview-tab/overview-tab.html b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/overview-tab/overview-tab.htmlindex 60d4cac5e69..c71afe1cb47 100644--- a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/overview-tab/overview-tab.html+++ b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/overview-tab/overview-tab.html@@ -1,12 +1,2 @@<wp-single-view [workPackage]="workPackage"- *ngIf="workPackage"></wp-single-view>--<div class="attributes-group" *ngIf="workPackage && !primerizedActivitiesEnabled">- <div class="attributes-group--header">- <div class="attributes-group--header-container">- <h3 class="attributes-group--header-text" [textContent]="tabName"></h3>- </div>- </div>-- <newest-activity-on-overview [workPackage]="workPackage"></newest-activity-on-overview>-</div>+ *ngIf="workPackage"></wp-single-view>\ No newline at end of filediff --git a/frontend/src/app/features/work-packages/services/notifications/work-package-notification.service.ts b/frontend/src/app/features/work-packages/services/notifications/work-package-notification.service.tsindex a4a19324f13..7044fb5d375 100644--- a/frontend/src/app/features/work-packages/services/notifications/work-package-notification.service.ts+++ b/frontend/src/app/features/work-packages/services/notifications/work-package-notification.service.ts@@ -33,21 +33,15 @@ import { WorkPackageResource } from 'core-app/features/hal/resources/work-packagimport { ApiV3Service } from 'core-app/core/apiv3/api-v3.service';import { HalResource } from 'core-app/features/hal/resources/hal-resource';import { TurboRequestsService } from 'core-app/core/turbo/turbo-requests.service';-import { ConfigurationService } from 'core-app/core/config/configuration.service';@Injectable()export class WorkPackageNotificationService extends HalResourceNotificationService {- primerizedActivitiesEnabled:boolean;-constructor(readonly injector:Injector,readonly apiV3Service:ApiV3Service,readonly turboRequests:TurboRequestsService,- readonly configurationService:ConfigurationService,) {super(injector);-- this.primerizedActivitiesEnabled = this.configurationService.activeFeatureFlags.includes('primerizedWorkPackageActivities');}public showSave(resource:HalResource, isCreate = false) {@@ -61,26 +55,12 @@ export class WorkPackageNotificationService extends HalResourceNotificationServiprotected showCustomError(errorResource:any, resource:WorkPackageResource):boolean {if (errorResource.errorIdentifier === 'urn:openproject-org:api:v3:errors:UpdateConflict') {- if (this.primerizedActivitiesEnabled) {- // currently we do not have a programmatic way to show the primer flash messages- // so we just do a request to the server to show it- // should be refactored once we have a programmatic way to show the primer flash messages!- void this.turboRequests.request('/work_packages/show_conflict_flash_message?scheme=danger', {- method: 'GET',- });- } else {- // code from before:- this.ToastService.addError({- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access- message: errorResource.message,- type: 'error',- link: {- text: this.I18n.t('js.hal.error.update_conflict_refresh'),- // eslint-disable-next-line @typescript-eslint/no-misused-promises- target: () => this.apiV3Service.work_packages.id(resource).refresh(),- },- });- }+ // currently we do not have a programmatic way to show the primer flash messages+ // so we just do a request to the server to show it+ // should be refactored once we have a programmatic way to show the primer flash messages!+ void this.turboRequests.request('/work_packages/show_conflict_flash_message?scheme=danger', {+ method: 'GET',+ });return true;}diff --git a/spec/features/activities/work_package/activities_spec.rb b/spec/features/activities/work_package/activities_spec.rbindex 5428863f8fd..e9c25256eaa 100644--- a/spec/features/activities/work_package/activities_spec.rb+++ b/spec/features/activities/work_package/activities_spec.rb@@ -28,7 +28,7 @@require "spec_helper"-RSpec.describe "Work package activity", :js, :with_cuprite, with_flag: { primerized_work_package_activities: true } do+RSpec.describe "Work package activity", :js, :with_cuprite dolet(:project) { create(:project) }let(:admin) { create(:admin) }let(:member_role) dodiff --git a/spec/features/activities/work_package/emoji_reactions_spec.rb b/spec/features/activities/work_package/emoji_reactions_spec.rbindex ac64940a429..598a300d3e9 100644--- a/spec/features/activities/work_package/emoji_reactions_spec.rb+++ b/spec/features/activities/work_package/emoji_reactions_spec.rb@@ -28,8 +28,7 @@require "spec_helper"-RSpec.describe "Emoji reactions on work package activity", :js, :with_cuprite,- with_flag: { primerized_work_package_activities: true } do+RSpec.describe "Emoji reactions on work package activity", :js, :with_cuprite dolet(:project) { create(:project) }let(:admin) { create(:admin) }let(:member) { create_user_as_project_member }diff --git a/spec/features/work_packages/custom_actions/custom_actions_spec.rb b/spec/features/work_packages/custom_actions/custom_actions_spec.rbindex afca1b64aea..68c77817e7a 100644--- a/spec/features/work_packages/custom_actions/custom_actions_spec.rb+++ b/spec/features/work_packages/custom_actions/custom_actions_spec.rb@@ -129,6 +129,7 @@ RSpec.describe "Custom actions", :js, :with_cuprite,cfendlet(:index_ca_page) { Pages::Admin::CustomActions::Index.new }+ let(:activity_tab) { Components::WorkPackages::Activities.new(work_package) }before dologin_as admin@@ -137,7 +138,7 @@ RSpec.describe "Custom actions", :js, :with_cuprite,# this big spec just has a different expectation when primerized_work_package_activities is enabled for the very last part# where the a different expectation banner would be expected# IMO not worth the extra computation time for the intermediate state when the feature flag is active- it "viewing workflow buttons", with_flag: { primerized_work_package_activities: false } do+ it "viewing workflow buttons" do# create custom action 'Unassign'index_ca_page.visit!@@ -319,24 +320,26 @@ RSpec.describe "Custom actions", :js, :with_cuprite,wp_page.click_custom_action("Unassign")wp_page.expect_attributes assignee: "-"- within ".work-package-details-activities-list" do- expect(page)- .to have_css(".op-user-activity .op-user-activity--user-name",- text: user.name,- wait: 10)- end+ activity_tab.expect_journal_details_header(text: user.name)+ # within ".work-package-details-activities-list" do+ # expect(page)+ # .to have_css(".op-user-activity .op-user-activity--user-name",+ # text: user.name,+ # wait: 10)+ # endwp_page.click_custom_action("Escalate")wp_page.expect_attributes priority: immediate_priority.name,status: default_status.name,assignee: "-","customField#{list_custom_field.id}" => selected_list_custom_field_options.map(&:name).join("\n")- within ".work-package-details-activities-list" do- expect(page)- .to have_css(".op-user-activity a.user-mention",- text: other_member_user.name,- wait: 10)- end+ # within ".work-package-details-activities-list" do+ # expect(page)+ # .to have_css(".op-user-activity a.user-mention",+ # text: other_member_user.name,+ # wait: 10)+ # end+ activity_tab.expect_journal_details_header(text: other_member_user.name)wp_page.click_custom_action("Close")wp_page.expect_attributes status: closed_status.name,@@ -441,7 +444,7 @@ RSpec.describe "Custom actions", :js, :with_cuprite,wp_page.click_custom_action("Escalate", expect_success: false)- wp_page.expect_toast type: :error, message: I18n.t("api_v3.errors.code_409")+ wp_page.expect_conflict_error_bannerendit "editing a current date custom action (Regression #30949)" dodiff --git a/spec/support/components/work_packages/activities.rb b/spec/support/components/work_packages/activities.rbindex 822808fea40..8be018b42b6 100644--- a/spec/support/components/work_packages/activities.rb+++ b/spec/support/components/work_packages/activities.rb@@ -74,39 +74,39 @@ module Componentsenddef expect_no_journal_changed_attribute(text: nil)- expect(page).not_to have_test_selector("op-journal-detail-description", text:)+ expect(page).not_to have_test_selector("op-journal-detail-description", text:, wait: 10)enddef expect_no_journal_notes(text: nil)- expect(page).not_to have_test_selector("op-journal-notes-body", text:)+ expect(page).not_to have_test_selector("op-journal-notes-body", text:, wait: 10)enddef expect_journal_details_header(text: nil)- expect(page).to have_test_selector("op-journal-details-header", text:)+ expect(page).to have_test_selector("op-journal-details-header", text:, wait: 10)enddef expect_no_journal_details_header(text: nil)- expect(page).not_to have_test_selector("op-journal-details-header", text:)+ expect(page).not_to have_test_selector("op-journal-details-header", text:, wait: 10)enddef expect_journal_notes_header(text: nil)- expect(page).to have_test_selector("op-journal-notes-header", text:)+ expect(page).to have_test_selector("op-journal-notes-header", text:, wait: 10)enddef expect_no_journal_notes_header(text: nil)- expect(page).not_to have_test_selector("op-journal-notes-header", text:)+ expect(page).not_to have_test_selector("op-journal-notes-header", text:, wait: 10)enddef expect_journal_notes(text: nil)- expect(page).to have_test_selector("op-journal-notes-body", text:)+ expect(page).to have_test_selector("op-journal-notes-body", text:, wait: 10)enddef expect_notification_bubble- expect(page).to have_test_selector("op-journal-unread-notification")+ expect(page).to have_test_selector("op-journal-unread-notification", wait: 10)enddef expect_no_notification_bubble- expect(page).not_to have_test_selector("op-journal-unread-notification")+ expect(page).not_to have_test_selector("op-journal-unread-notification", wait: 10)enddef expect_journal_container_at_bottom@@ -130,19 +130,19 @@ module Componentsenddef expect_empty_state- expect(page).to have_test_selector("op-wp-journals-container-empty")+ expect(page).to have_test_selector("op-wp-journals-container-empty", wait: 10)enddef expect_no_empty_state- expect(page).not_to have_test_selector("op-wp-journals-container-empty")+ expect(page).not_to have_test_selector("op-wp-journals-container-empty", wait: 10)enddef expect_input_field- expect(page).to have_test_selector("op-work-package-journal-form")+ expect(page).to have_test_selector("op-work-package-journal-form", wait: 10)enddef expect_no_input_field- expect(page).not_to have_test_selector("op-work-package-journal-form")+ expect(page).not_to have_test_selector("op-work-package-journal-form", wait: 10)enddef open_new_comment_editordiff --git a/spec/support/pages/work_packages/abstract_work_package.rb b/spec/support/pages/work_packages/abstract_work_package.rbindex 751b601e3b7..e9983e40698 100644--- a/spec/support/pages/work_packages/abstract_work_package.rb+++ b/spec/support/pages/work_packages/abstract_work_package.rb@@ -115,12 +115,6 @@ module Pagesdef ensure_page_loadedexpect_angular_frontend_initialized- unless OpenProject::FeatureDecisions.primerized_work_package_activities_active?- expect(page).to have_css(".op-user-activity--user-name",- text: work_package.journals.last.user.name,- minimum: 1,- wait: 10)- endenddef disable_ajax_requests