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

fix failing tests

bsatarnejade79b58dc36e2
diff --git a/frontend/src/app/shared/components/op-context-menu/handlers/op-types-context-menu.directive.ts b/frontend/src/app/shared/components/op-context-menu/handlers/op-types-context-menu.directive.ts
index 6eda8f0252a..935229ba5bf 100644
--- a/frontend/src/app/shared/components/op-context-menu/handlers/op-types-context-menu.directive.ts
+++ b/frontend/src/app/shared/components/op-context-menu/handlers/op-types-context-menu.directive.ts
@@ -102,6 +102,7 @@ export class OpTypesContextMenuDirective extends OpContextMenuTrigger {
ariaLabel: type.name,
class: Highlighting.inlineClass('type', type.id!),
onClick: ($event:JQuery.TriggeredEvent) => {
+ this.isOpen = false;
if (isClickedWithModifier($event)) {
return false;
}
diff --git a/frontend/src/app/shared/components/op-context-menu/handlers/wp-view-dropdown-menu.directive.ts b/frontend/src/app/shared/components/op-context-menu/handlers/wp-view-dropdown-menu.directive.ts
index 37bcf738dcc..7a990351484 100644
--- a/frontend/src/app/shared/components/op-context-menu/handlers/wp-view-dropdown-menu.directive.ts
+++ b/frontend/src/app/shared/components/op-context-menu/handlers/wp-view-dropdown-menu.directive.ts
@@ -81,6 +81,7 @@ export class WorkPackageViewDropdownMenuDirective extends OpContextMenuTrigger {
title: this.I18n.t('js.button_show_cards'),
icon: 'icon-view-card',
onClick: (evt:any) => {
+ this.isOpen = false;
this.wpDisplayRepresentationService.setDisplayRepresentation(wpDisplayCardRepresentation);
if (this.wpTableTimeline.isVisible) {
// Necessary for the timeline buttons to disappear
@@ -100,6 +101,7 @@ export class WorkPackageViewDropdownMenuDirective extends OpContextMenuTrigger {
title: this.I18n.t('js.button_show_table'),
icon: 'icon-view-list',
onClick: (evt:any) => {
+ this.isOpen = false;
this.wpDisplayRepresentationService.setDisplayRepresentation(wpDisplayListRepresentation);
if (this.wpTableTimeline.isVisible) {
this.wpTableTimeline.toggle();
@@ -118,6 +120,7 @@ export class WorkPackageViewDropdownMenuDirective extends OpContextMenuTrigger {
title: this.I18n.t('js.button_show_gantt'),
icon: 'icon-view-timeline',
onClick: (evt:any) => {
+ this.isOpen = false;
if (!this.wpTableTimeline.isVisible) {
this.wpTableTimeline.toggle();
}