From e99e02147925f10731c039a90b7c313c6e586855 Mon Sep 17 00:00:00 2001 From: Martin Artnik Date: Fri, 16 Sep 2022 16:08:36 +0200 Subject: [PATCH] Fix user smart annotations [SCI-7219] --- app/helpers/application_helper.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2e852ef2a..8769979f9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -162,12 +162,12 @@ module ApplicationHelper

#{user.email}

) if user_still_in_team - user_t = user.teams.find_by(id: team) + user_team_assignment = user.user_assignments.find_by(assignable: team) user_description += %(

#{I18n.t('atwho.users.popover_html', - role: user_t.role.capitalize, - team: user_t.team.name, - time: I18n.l(user_t.created_at, format: :full_date))} + role: user_team_assignment.user_role.name.capitalize, + team: user_team_assignment.assignable.name, + time: I18n.l(user_team_assignment.created_at, format: :full_date))}

) else user_description += %(

)