Merge branch 'standalone_develop' into pm_project_develop

This commit is contained in:
2024-03-11 09:23:22 +08:00
3 changed files with 15 additions and 11 deletions

View File

@@ -182,14 +182,6 @@ class Organization < Owner
organization_users.count
end
def teams_count
teams.count
end
def organization_users_count
organization_users.count
end
def real_name
name = lastname + firstname
name = name.blank? ? (nickname.blank? ? login : nickname) : name
@@ -217,4 +209,11 @@ class Organization < Owner
enabling_cla == true
end
def num_users
organization_user_ids = self.organization_users.pluck(:user_id).uniq
project_member_user_ids = self.projects.joins(:members).pluck("members.user_id").uniq
ids = organization_user_ids + project_member_user_ids
ids.uniq.size
end
end