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

[#62480] do not attempt to render user hover card for groups

Tobias Dillmannd326bedca646
diff --git a/frontend/src/app/shared/components/fields/edit/field-types/multi-select-edit-field.component.ts b/frontend/src/app/shared/components/fields/edit/field-types/multi-select-edit-field.component.ts
index 9d629b386f5..b62c26e1600 100644
--- a/frontend/src/app/shared/components/fields/edit/field-types/multi-select-edit-field.component.ts
+++ b/frontend/src/app/shared/components/fields/edit/field-types/multi-select-edit-field.component.ts
@@ -35,6 +35,7 @@ import { ValueOption } from 'core-app/shared/components/fields/edit/field-types/
import { NgSelectComponent } from '@ng-select/ng-select';
import { InjectField } from 'core-app/shared/helpers/angular/inject-field.decorator';
import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';
+import { UserResource } from 'core-app/features/hal/resources/user-resource';
@Component({
templateUrl: './multi-select-edit-field.component.html',
@@ -247,10 +248,10 @@ export class MultiSelectEditFieldComponent extends EditFieldComponent implements
/**
* For multi-select fields that are of type User, we want to show a hover card when hovering over users in the
- * dropdown. For this to happen we must define a URL for the hover card.
+ * dropdown. For this to happen, we must define a URL for the hover card.
*/
- protected getHoverCardUrl(item:{ id?:string }) {
- if (item && item.id) {
+ protected getHoverCardUrl(item:HalResource) {
+ if (item instanceof UserResource && item.id) {
return this.pathHelperService.userHoverCardPath(item.id);
}