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

Restrict adding me value when empty or searching for me

Oliver Günther6af4c0b50ae6
diff --git a/frontend/src/app/features/work-packages/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.ts b/frontend/src/app/features/work-packages/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.ts
index 25af8f383c5..a690482dae1 100644
--- a/frontend/src/app/features/work-packages/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.ts
+++ b/frontend/src/app/features/work-packages/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.ts
@@ -88,7 +88,7 @@ export class FilterSearchableMultiselectValueComponent extends UntilDestroyedMix
.filtered(filters, { pageSize: '-1' })
.get()
.pipe(
- switchMap((collection) => this.withMeValue(collection.elements)),
+ switchMap((collection) => this.withMeValue(matching, collection.elements)),
);
return filteredData;
@@ -110,8 +110,8 @@ export class FilterSearchableMultiselectValueComponent extends UntilDestroyedMix
this.cdRef.detectChanges();
}
- private withMeValue(elements:HalResource[]):Observable<HalResource[]> {
- if (!this.isUserResource) {
+ private withMeValue(matching:string, elements:HalResource[]):Observable<HalResource[]> {
+ if (!this.isUserResource || (!!matching && matching !== 'me')) {
return of(elements);
}