Skip to content

Conversation

@hariombalhara
Copy link
Member

What does this PR do?

Fixes the troubleshooter's getSchedule request to use orgAwareUsername instead of username when fetching schedule data.

In organization contexts, users have different usernames per organization (via Profiles). The troubleshooter was using session?.user.username which returns the base username, but the getSchedule endpoint expects the org-aware username to properly resolve the user's schedule within the organization context. This aligns the troubleshooter behavior with how the booking page handles the same request.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A - no documentation changes needed.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. Set up a user within an organization that has a different org username than their base username
  2. Navigate to the troubleshooter page
  3. Verify that the schedule loads correctly and shows the user's availability
  4. Compare behavior with the booking page to ensure consistency

Human Review Checklist

  • Verify orgAwareUsername is available in all contexts where username was previously used (org and non-org users)
  • Confirm this matches how the booking page handles username in getSchedule requests

Link to Devin run: https://app.devin.ai/sessions/5661869d6af3401c9ba6a099575673a9
Requested by: @hariombalhara

@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@hariombalhara hariombalhara marked this pull request as ready for review January 21, 2026 15:04
@graphite-app graphite-app bot requested a review from a team January 21, 2026 15:04
@graphite-app graphite-app bot added core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO labels Jan 21, 2026
@hariombalhara hariombalhara added ready-for-e2e and removed enterprise area: enterprise, audit log, organisation, SAML, SSO core area: core, team members only labels Jan 21, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@anikdhabal anikdhabal merged commit 9fa245a into main Jan 21, 2026
89 of 90 checks passed
@anikdhabal anikdhabal deleted the troubleshooter-ensure-org-username-getSchedule branch January 21, 2026 16:49
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.

3 participants