From ea1d9a277a54b18c0b9be0344aa13c377a824ca1 Mon Sep 17 00:00:00 2001 From: Behrokh Satarnejad <62008897+bsatarnejad@users.noreply.github.com> Date: Wed, 6 Apr 2022 11:48:43 +0200 Subject: [PATCH] [41585]Remove "Project" filter from filter list (#10406) * remove project from filters * remove project from fliters where we have include projects modal * change test to use include project instead of project filter --- .../features/calendar/wp-calendar/wp-calendar.component.ts | 3 +++ .../team-planner/page/team-planner-page.component.ts | 1 + .../routing/wp-view-page/wp-view-page.component.ts | 3 +++ spec/features/projects/projects_portfolio_spec.rb | 5 +++-- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/features/calendar/wp-calendar/wp-calendar.component.ts b/frontend/src/app/features/calendar/wp-calendar/wp-calendar.component.ts index 96a485e3c8..5b1ac97430 100644 --- a/frontend/src/app/features/calendar/wp-calendar/wp-calendar.component.ts +++ b/frontend/src/app/features/calendar/wp-calendar/wp-calendar.component.ts @@ -88,6 +88,9 @@ export class WorkPackagesCalendarComponent extends UntilDestroyedMixin implement } ngOnInit():void { + this.wpTableFilters.hidden.push( + 'project', + ); this.calendar.resize$ .pipe( this.untilDestroyed(), diff --git a/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts b/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts index 60ea610c42..9757b3c18a 100644 --- a/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts +++ b/frontend/src/app/features/team-planner/team-planner/page/team-planner-page.component.ts @@ -103,6 +103,7 @@ export class TeamPlannerPageComponent extends PartitionedQuerySpacePageComponent 'memberOfGroup', 'assignedToRole', 'assigneeOrGroup', + 'project', ); } diff --git a/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts b/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts index 33a985341f..55f7fb6907 100644 --- a/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts +++ b/frontend/src/app/features/work-packages/routing/wp-view-page/wp-view-page.component.ts @@ -102,6 +102,9 @@ export class WorkPackageViewPageComponent extends PartitionedQuerySpacePageCompo ngOnInit() { super.ngOnInit(); + this.wpTableFilters.hidden.push( + 'project', + ); this.text.button_settings = this.I18n.t('js.button_settings'); } diff --git a/spec/features/projects/projects_portfolio_spec.rb b/spec/features/projects/projects_portfolio_spec.rb index ce3aa8d760..75bcba6a0c 100644 --- a/spec/features/projects/projects_portfolio_spec.rb +++ b/spec/features/projects/projects_portfolio_spec.rb @@ -41,6 +41,7 @@ describe 'Projects index page', let(:filters) { ::Components::WorkPackages::Filters.new } let(:wp_table) { ::Pages::WorkPackagesTable.new } let(:projects_page) { Pages::Projects::Index.new } + let(:dropdown) { ::Components::ProjectIncludeComponent.new } before do login_as admin @@ -142,11 +143,11 @@ describe 'Projects index page', expect(page).to have_selector '.group--value', text: 'B' # Expect type and project filters - filters.expect_filter_count 2 + dropdown.expect_count 2 + filters.expect_filter_count 1 filters.open filters.expect_filter_by('Type', 'is', [type_milestone.name]) - filters.expect_filter_by('Project', 'is', [project_a.name, project_b.name]) # Expect columns columns.open_modal