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

allow user to self-mention them in comments and work-package descriptions

Sven R. Kunze64ea334ad2e2
diff --git a/app/services/notifications/create_from_model_service.rb b/app/services/notifications/create_from_model_service.rb
index 12398b7f96a..b88ee05eb43 100644
--- a/app/services/notifications/create_from_model_service.rb
+++ b/app/services/notifications/create_from_model_service.rb
@@ -292,7 +292,13 @@ class Notifications::CreateFromModelService
end
def remove_self_recipient(receivers)
- receivers.delete(user_with_fallback.id)
+ if receivers.key?(user_with_fallback.id)
+ self_reasons = receivers[user_with_fallback.id]
+ self_reasons.delete_if { |item| item != NotificationSettings::MENTIONED }
+ if self_reasons.empty?
+ receivers.delete(user_with_fallback.id)
+ end
+ end
end
def receivers_hash
diff --git a/frontend/src/app/core/path-helper/apiv3-paths.ts b/frontend/src/app/core/path-helper/apiv3-paths.ts
index e5174054b5a..3fdf6026b74 100644
--- a/frontend/src/app/core/path-helper/apiv3-paths.ts
+++ b/frontend/src/app/core/path-helper/apiv3-paths.ts
@@ -43,8 +43,6 @@ export class ApiV3Paths {
filters.add('member', '=', [projectId.toString()]);
// That are users:
filters.add('type', '=', ['User', 'Group']);
- // That are not the current user:
- filters.add('id', '!', ['me']);
if (term && term.length > 0) {
// Containing the that substring: