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

fix: Old username link on org user's profile. #13753

Merged
merged 1 commit into from
Feb 19, 2024
Merged

Conversation

hariombalhara
Copy link
Member

@hariombalhara hariombalhara commented Feb 19, 2024

What does this PR do?

Before:
image

After:
image

Fixes https://calcominc.slack.com/archives/C05V243E153/p1708111917971829.

Note: this bug occurs only for the existing users that are invited to an organization and doesn't occur for migrated users that are migrated through migration script. This is because migration script changes user.username but invitation logic only sets the correct username in profile.username

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

  1. Invite an existing user teampro to Acme.
  2. Accept the invite.
  3. The username changes to teampro-example
  4. Access at acme.cal.local:3000/teampro-example
  5. Make sure that there are atleast 2 events added to teampro user so that the page doesn't redirect to the only event-type
  6. Accessing any event-type from the profile page takes to 404 page as we are trying to access old username on organization domain. It should be fixed now.

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

  • I haven't added tests that prove my fix is effective or that my feature works

Test followup in #13754

Copy link

vercel bot commented Feb 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2024 1:13pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Feb 19, 2024 1:13pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Feb 19, 2024 1:13pm
qa ⬜️ Ignored (Inspect) Visit Preview Feb 19, 2024 1:13pm

Copy link
Contributor

github-actions bot commented Feb 19, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@hariombalhara
Copy link
Member Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@keithwillcode keithwillcode added consumer core area: core, team members only labels Feb 19, 2024
@hariombalhara hariombalhara changed the title Fix old username link on org fix: Old username link on org user's profile. Feb 19, 2024
Copy link
Contributor

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@hariombalhara hariombalhara added the High priority Created by Linear-GitHub Sync label Feb 19, 2024
@hariombalhara hariombalhara requested a review from a team February 19, 2024 13:23
Copy link

deploysentinel bot commented Feb 19, 2024

Current Playwright Test Results Summary

✅ 447 Passing - ⚠️ 14 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 02/19/2024 01:33:57pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 6e1bdd6

Started: 02/19/2024 01:22:08pm UTC

⚠️ Flakes

📄   apps/web/playwright/booking/multipleEmailQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Multiple Email Question and Each Other Question Booking With Multiple Email Question and checkbox Question Multiple Email required and checkbox required
Retry 1Initial Attempt
0.44% (1) 1 / 225 run
failed over last 7 days
5.33% (12) 12 / 225 runs
flaked over last 7 days

📄   apps/web/playwright/booking/longTextQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Long Text Question and Each Other Question Booking With Long Text Question and multiselect Question Long Text and multiselect text required
Retry 1Initial Attempt
0% (0) 0 / 226 runs
failed over last 7 days
2.65% (6) 6 / 226 runs
flaked over last 7 days

📄   apps/web/playwright/booking/checkboxGroupQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Checkbox Group Question and Each Other Question Booking With Checkbox Group Question and Address Question Booking With Checkbox Group Question and select Question Checkbox Group required and select required
Retry 1Initial Attempt
0% (0) 0 / 227 runs
failed over last 7 days
4.85% (11) 11 / 227 runs
flaked over last 7 days

📄   apps/web/playwright/booking/selectQuestion.e2e.ts • 3 Flakes

Top 1 Common Error Messages

null

3 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Phone Question and Each Other Question Booking With Select Question and checkbox group Question Select required and checkbox group required
Retry 1Initial Attempt
0% (0) 0 / 231 runs
failed over last 7 days
4.33% (10) 10 / 231 runs
flaked over last 7 days
Booking With Phone Question and Each Other Question Booking With Select Question and Long text Question Select required and Long text required
Retry 1Initial Attempt
0% (0) 0 / 231 runs
failed over last 7 days
6.49% (15) 15 / 231 runs
flaked over last 7 days
Booking With Phone Question and Each Other Question Booking With Select Question and multiselect Question Select required and multiselect text required
Retry 1Initial Attempt
0% (0) 0 / 231 runs
failed over last 7 days
4.33% (10) 10 / 231 runs
flaked over last 7 days

📄   apps/web/playwright/login.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
user can login & logout succesfully -- future login flow user & logout using dashboard
Retry 1Initial Attempt
0.43% (1) 1 / 231 run
failed over last 7 days
44.16% (102) 102 / 231 runs
flaked over last 7 days

📄   apps/web/playwright/booking/addressQuestione2e/addressQuestion.e2e.ts • 3 Flakes

Top 1 Common Error Messages

null

3 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Address Question and Each Other Question Booking With Address Question and Long text Question Addres required and Long Text required
Retry 1Initial Attempt
2.11% (5) 5 / 237 runs
failed over last 7 days
4.64% (11) 11 / 237 runs
flaked over last 7 days
Booking With Address Question and Each Other Question Booking With Address Question and Multi email Question Address required and Multi email required
Retry 1Initial Attempt
0.43% (1) 1 / 233 run
failed over last 7 days
6.44% (15) 15 / 233 runs
flaked over last 7 days
Booking With Address Question and Each Other Question Booking With Address Question and Phone Question Address required and Phone required
Retry 1Initial Attempt
0% (0) 0 / 232 runs
failed over last 7 days
9.91% (23) 23 / 232 runs
flaked over last 7 days

📄   apps/web/playwright/webhook.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Webhook tests Add webhook on event type config Booking rescheduled
Retry 1Initial Attempt
1.24% (3) 3 / 242 runs
failed over last 7 days
3.72% (9) 9 / 242 runs
flaked over last 7 days

📄   apps/web/playwright/event-types.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Event Types tests -- future user can add multiple organizer address
Retry 1Initial Attempt
0% (0) 0 / 237 runs
failed over last 7 days
17.30% (41) 41 / 237 runs
flaked over last 7 days

📄   apps/web/playwright/profile.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Update Profile Cannot update a users email when existing user has same email (verification enabled)
Retry 1Initial Attempt
1.61% (4) 4 / 248 runs
failed over last 7 days
49.60% (123) 123 / 248 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/inline.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Inline Iframe Inline Iframe - Configured with Dark Theme
Retry 1Initial Attempt
0% (0) 0 / 243 runs
failed over last 7 days
42.39% (103) 103 / 243 runs
flaked over last 7 days

View Detailed Build Results


@@ -155,7 +155,7 @@ export function UserPage(props: InferGetServerSidePropsType<typeof getServerSide
<Link
prefetch={false}
href={{
pathname: `/${user.username}/${type.slug}`,
pathname: `/${user.profile.username}/${type.slug}`,
Copy link
Member Author

Choose a reason for hiding this comment

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

Profile.username is supposed to have the correct username for an org member as well as non org member.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consumer core area: core, team members only High priority Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants