Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Member card fix email display #3555

Merged
merged 3 commits into from
Feb 5, 2024

Conversation

brendanlaschke
Copy link
Contributor

Bildschirmfoto 2024-01-19 um 15 33 55

closes #3554

Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good one as always @brendanlaschke!

@charlesBochet
Copy link
Member

@brendanlaschke before we merge it though, we would need to populate this email on signUp, could you also make sure we are filling workspaceMember email address in signUp methode of user.service.ts on the the backend side?

Then, we will need to run a SQL script to update existing workspace in production

@brendanlaschke
Copy link
Contributor Author

Interesting especially as the userEmail is already used multiple times in the codebase :)
Will you write the migration script? or should I give it a try?

@charlesBochet
Copy link
Member

If you have time, it would be great to create a command that would do it! Would really help :)

@brendanlaschke
Copy link
Contributor Author

Set search_path = workspace_1wgvd1injqtife6y4rvfbu3h5;

UPDATE "workspaceMember" member
SET "userEmail" = u.email
FROM core."user" u
WHERE u.id = member."userId" and member."userEmail" = '';

Would this be enough? Or how would you target all schemas, via a search path or do you loop over them or do you have a different method?

@charlesBochet charlesBochet merged commit 3a9007b into twentyhq:main Feb 5, 2024
11 checks passed
@charlesBochet
Copy link
Member

@brendanlaschke I'm going to take of the script manually, it's not a big deal

@brendanlaschke brendanlaschke deleted the member-card-email branch February 5, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display Email Instead of Duplicate Name in 'Members' Settings
2 participants