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

Remove work_package_sharing feature flag

Klaus Zanderse10de2fbe8bd
diff --git a/config/initializers/feature_decisions.rb b/config/initializers/feature_decisions.rb
index 401b2feb831..407769fe3cd 100644
--- a/config/initializers/feature_decisions.rb
+++ b/config/initializers/feature_decisions.rb
@@ -38,5 +38,3 @@ require_relative '../../lib_static/open_project/feature_decisions'
# initializer 'the_engine.feature_decisions' do
# OpenProject::FeatureDecisions.add :some_flag
# end
-
-OpenProject::FeatureDecisions.add :work_package_sharing
diff --git a/frontend/src/app/features/in-app-notifications/center/menu/menu.component.ts b/frontend/src/app/features/in-app-notifications/center/menu/menu.component.ts
index ae6beb1ceeb..0a9996f9125 100644
--- a/frontend/src/app/features/in-app-notifications/center/menu/menu.component.ts
+++ b/frontend/src/app/features/in-app-notifications/center/menu/menu.component.ts
@@ -172,9 +172,7 @@ export class IanMenuComponent implements OnInit {
readonly bannersService:BannersService,
readonly configurationService:ConfigurationService,
) {
- if (this.configurationService.activeFeatureFlags.includes('workPackageSharing')) {
this.reasonMenuItems.push(this.sharedMenuItem);
- }
}
ngOnInit():void {
diff --git a/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.ts b/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.ts
index 2f8a7e9789b..bad517ee615 100644
--- a/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.ts
+++ b/frontend/src/app/features/user-preferences/notifications-settings/page/notifications-settings-page.component.ts
@@ -154,7 +154,7 @@ export class NotificationsSettingsPageComponent extends UntilDestroyedMixin impl
this.form.disable();
this.userId = (this.userId || this.uiRouterGlobals.params.userId) as string;
this.eeShowBanners = this.bannersService.eeShowBanners;
- this.displaySharedOption = this.configurationService.activeFeatureFlags.includes('workPackageSharing');
+ this.displaySharedOption = true;
this
.currentUserService
diff --git a/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.ts b/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.ts
index 39716da008a..55386a5335a 100644
--- a/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.ts
+++ b/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.ts
@@ -89,7 +89,7 @@ export class NotificationSettingsTableComponent implements OnInit {
ngOnInit():void {
this.eeShowBanners = this.bannersService.eeShowBanners;
- this.displaySharedOption = this.configurationService.activeFeatureFlags.includes('workPackageSharing');
+ this.displaySharedOption = true;
}
projectLink(href:string) {
diff --git a/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.component.ts b/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.component.ts
index a82e2fd6985..b7d65edb5ba 100644
--- a/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.component.ts
+++ b/frontend/src/app/features/work-packages/components/wp-details/wp-details-toolbar.component.ts
@@ -35,6 +35,7 @@ import { ConfigurationService } from 'core-app/core/config/configuration.service
@Component({
selector: 'wp-details-toolbar',
templateUrl: './wp-details-toolbar.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
})
export class WorkPackageSplitViewToolbarComponent {
@Input() workPackage:WorkPackageResource;
@@ -52,6 +53,6 @@ export class WorkPackageSplitViewToolbarComponent {
readonly halEditing:HalResourceEditingService,
readonly configurationService:ConfigurationService,
) {
- this.displayShareButton = this.configurationService.activeFeatureFlags.includes('workPackageSharing');
+ this.displayShareButton = true;
}
}
diff --git a/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.component.ts b/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.component.ts
index d1ded7eadff..1891f96c7b5 100644
--- a/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.component.ts
+++ b/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.component.ts
@@ -54,6 +54,7 @@ import { CurrentUserService } from 'core-app/core/current-user/current-user.serv
CommentService,
{ provide: HalResourceNotificationService, useExisting: WorkPackageNotificationService },
],
+ changeDetection: ChangeDetectionStrategy.OnPush,
})
export class WorkPackagesFullViewComponent extends WorkPackageSingleViewBase implements OnInit {
// Watcher properties
@@ -107,8 +108,7 @@ export class WorkPackagesFullViewComponent extends WorkPackageSingleViewBase imp
this.isWatched = Object.prototype.hasOwnProperty.call(wp, 'unwatch');
this.displayWatchButton = Object.prototype.hasOwnProperty.call(wp, 'unwatch') || Object.prototype.hasOwnProperty.call(wp, 'watch');
this.displayTimerButton = Object.prototype.hasOwnProperty.call(wp, 'logTime');
- this.displayShareButton$ = this.configurationService.activeFeatureFlags.includes('workPackageSharing')
- && this.currentUserService.hasCapabilities$('work_package_shares/index', wp.project.id);
+ this.displayShareButton$ = this.currentUserService.hasCapabilities$('work_package_shares/index', wp.project.id);
// watchers
if (wp.watchers) {
diff --git a/spec/features/notifications/notification_center/notification_center_sidemenu_spec.rb b/spec/features/notifications/notification_center/notification_center_sidemenu_spec.rb
index dc6143fd3f4..e9ce1c68816 100644
--- a/spec/features/notifications/notification_center/notification_center_sidemenu_spec.rb
+++ b/spec/features/notifications/notification_center/notification_center_sidemenu_spec.rb
@@ -3,8 +3,7 @@ require 'spec_helper'
RSpec.describe "Notification center sidemenu",
:js,
:with_cuprite,
- with_ee: %i[date_alerts],
- with_flag: { work_package_sharing: true } do
+ with_ee: %i[date_alerts]} do
shared_let(:project) { create(:project) }
shared_let(:project2) { create(:project) }
shared_let(:project3) { create(:project, parent: project2) }
diff --git a/spec/features/users/notifications/shared_examples.rb b/spec/features/users/notifications/shared_examples.rb
index dcce527a274..faa4f7aae45 100644
--- a/spec/features/users/notifications/shared_examples.rb
+++ b/spec/features/users/notifications/shared_examples.rb
@@ -1,7 +1,6 @@
RSpec.shared_examples 'notification settings workflow' do
describe 'with another project the user can see',
- with_ee: %i[date_alerts],
- with_flag: { work_package_sharing: true } do
+ with_ee: %i[date_alerts] do
shared_let(:project) { create(:project) }
shared_let(:project_alt) { create(:project) }
shared_let(:role) { create(:project_role, permissions: %i[view_project]) }
@@ -118,7 +117,7 @@ RSpec.shared_examples 'notification settings workflow' do
container = page.find('[data-test-selector="notification-setting-inline-create"] ng-select')
settings_page.search_autocomplete container, query: project.name, results_selector: 'body'
expect(page).to have_text 'This project is already selected'
- expect(page).to have_selector('.ng-option-disabled', text: project.name)
+ expect(page).to have_css('.ng-option-disabled', text: project.name)
end
context 'when overdue alerts are disabled for one project, enabled for another' do
diff --git a/spec/features/work_packages/share/bulk_sharing_spec.rb b/spec/features/work_packages/share/bulk_sharing_spec.rb
index b25eb14eada..71e241f4a22 100644
--- a/spec/features/work_packages/share/bulk_sharing_spec.rb
+++ b/spec/features/work_packages/share/bulk_sharing_spec.rb
@@ -32,8 +32,7 @@ require 'spec_helper'
RSpec.describe 'Work Packages', 'Bulk Sharing',
:js, :with_cuprite,
- with_ee: %i[work_package_sharing],
- with_flag: { work_package_sharing: true } do
+ with_ee: %i[work_package_sharing] do
shared_let(:view_work_package_role) { create(:view_work_package_role) }
shared_let(:comment_work_package_role) { create(:comment_work_package_role) }
shared_let(:edit_work_package_role) { create(:edit_work_package_role) }
diff --git a/spec/features/work_packages/share/enterprise_restriction_spec.rb b/spec/features/work_packages/share/enterprise_restriction_spec.rb
index 497f866a6ed..31afb836d9f 100644
--- a/spec/features/work_packages/share/enterprise_restriction_spec.rb
+++ b/spec/features/work_packages/share/enterprise_restriction_spec.rb
@@ -30,9 +30,7 @@
require 'rails_helper'
-RSpec.describe 'Work Package Sharing Enterprise Restriction',
- :js, :with_cuprite,
- with_flag: { work_package_sharing: true } do
+RSpec.describe 'Work Package Sharing Enterprise Restriction', :js, :with_cuprite do
shared_let(:view_work_package_role) { create(:view_work_package_role) }
shared_let(:comment_work_package_role) { create(:comment_work_package_role) }
shared_let(:edit_work_package_role) { create(:edit_work_package_role) }
diff --git a/spec/features/work_packages/share/filter_spec.rb b/spec/features/work_packages/share/filter_spec.rb
index f2225070822..f0e78613718 100644
--- a/spec/features/work_packages/share/filter_spec.rb
+++ b/spec/features/work_packages/share/filter_spec.rb
@@ -32,8 +32,7 @@ require 'spec_helper'
RSpec.describe 'Work package sharing',
:js, :with_cuprite,
- with_ee: %i[work_package_sharing],
- with_flag: { work_package_sharing: true } do
+ with_ee: %i[work_package_sharing] do
shared_let(:view_work_package_role) { create(:view_work_package_role) }
shared_let(:comment_work_package_role) { create(:comment_work_package_role) }
shared_let(:edit_work_package_role) { create(:edit_work_package_role) }
diff --git a/spec/features/work_packages/share/multi_invite_spec.rb b/spec/features/work_packages/share/multi_invite_spec.rb
index 0a4088d09a7..588a0cd8a88 100644
--- a/spec/features/work_packages/share/multi_invite_spec.rb
+++ b/spec/features/work_packages/share/multi_invite_spec.rb
@@ -32,8 +32,7 @@ require 'spec_helper'
RSpec.describe 'Work package sharing',
:js, :with_cuprite,
- with_ee: %i[work_package_sharing],
- with_flag: { work_package_sharing: true } do
+ with_ee: %i[work_package_sharing] do
shared_let(:view_work_package_role) { create(:view_work_package_role) }
shared_let(:comment_work_package_role) { create(:comment_work_package_role) }
shared_let(:edit_work_package_role) { create(:edit_work_package_role) }
diff --git a/spec/features/work_packages/share/share_account_activation_spec.rb b/spec/features/work_packages/share/share_account_activation_spec.rb
index bc714c60dfd..16f53666892 100644
--- a/spec/features/work_packages/share/share_account_activation_spec.rb
+++ b/spec/features/work_packages/share/share_account_activation_spec.rb
@@ -32,8 +32,7 @@ require 'spec_helper'
RSpec.describe 'Work package sharing invited users',
:js, :with_cuprite,
- with_ee: %i[work_package_sharing],
- with_flag: { work_package_sharing: true } do
+ with_ee: %i[work_package_sharing] do
shared_let(:view_work_package_role) { create(:view_work_package_role) }
shared_let(:editor) { create(:admin, firstname: 'Mr.', lastname: 'Sharer') }
diff --git a/spec/features/work_packages/share_spec.rb b/spec/features/work_packages/share_spec.rb
index 40bc61eed14..a863220bdfd 100644
--- a/spec/features/work_packages/share_spec.rb
+++ b/spec/features/work_packages/share_spec.rb
@@ -32,8 +32,7 @@ require 'spec_helper'
RSpec.describe 'Work package sharing',
:js, :with_cuprite,
- with_ee: %i[work_package_sharing],
- with_flag: { work_package_sharing: true } do
+ with_ee: %i[work_package_sharing] do
shared_let(:view_work_package_role) { create(:view_work_package_role) }
shared_let(:comment_work_package_role) { create(:comment_work_package_role) }
shared_let(:edit_work_package_role) { create(:edit_work_package_role) }
@@ -267,7 +266,6 @@ RSpec.describe 'Work package sharing',
end
end
-
context 'when lacking share permission but having the viewing permission' do
let(:sharer_role) do
create(:project_role,
@@ -316,16 +314,6 @@ RSpec.describe 'Work package sharing',
end
end
- context 'without the feature flag enabled', with_flag: { work_package_sharing: false } do
- let(:sharer_role) do
- create(:project_role,
- permissions: %i(view_work_packages
- view_shared_work_packages))
- end
-
- it_behaves_like "'Share' button is not rendered"
- end
-
context "without the viewing permission" do
let(:sharer_role) do
create(:project_role,