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

return as soon as possible

Tobias Dillmann811fbd305eb0
diff --git a/app/components/users/hover_card_component.rb b/app/components/users/hover_card_component.rb
index 1087d735a47..f22870a89e6 100644
--- a/app/components/users/hover_card_component.rb
+++ b/app/components/users/hover_card_component.rb
@@ -49,8 +49,9 @@ class Users::HoverCardComponent < ApplicationComponent
# The latter string is cut off since the complete list of project names would exceed the allowed `max_length`.
def project_membership_summary(max_length = 40)
projects = @user.projects
+ return no_project_text if projects.empty?
+
project_links = linked_project_names(projects)
- return no_project_text if project_links.empty?
cutoff_index = calculate_cutoff_index(projects.map(&:name), max_length)
build_summary(project_links, cutoff_index)