Skip to content

ref(forms): Migrate organization join request off deprecatedforms to scraps form#119194

Open
priscilawebdev wants to merge 11 commits into
masterfrom
pri/ref-forms-migrate-organization-join-request
Open

ref(forms): Migrate organization join request off deprecatedforms to scraps form#119194
priscilawebdev wants to merge 11 commits into
masterfrom
pri/ref-forms-migrate-organization-join-request

Conversation

@priscilawebdev

@priscilawebdev priscilawebdev commented Jul 8, 2026

Copy link
Copy Markdown
Member

Before
image

After

image image

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 8, 2026
@priscilawebdev
priscilawebdev marked this pull request as ready for review July 20, 2026 09:47
Comment on lines +37 to +40
trackAnalytics('join_request.created', {
organization: orgId,
referrer: decodeScalar(location.query.referrer, ''),
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: The trackAnalytics call for join_request.created sends an organization property, which mismatches the backend's expected organization_id and the frontend's TypeScript definition.
Severity: LOW

Suggested Fix

Update the trackAnalytics call to send the correct properties as expected by the backend. This involves changing organization: orgId to organization_id: parseInt(orgId, 10) and adding the required member_id. Also, update the frontend TypeScript definition for the event to match the new payload structure to resolve the type error.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: static/app/views/organizationJoinRequest/index.tsx#L37-L40

Potential issue: The `trackAnalytics` call for the `'join_request.created'` event sends
a payload with an `organization` property. This is incorrect as the backend event schema
expects an integer `organization_id` and a `member_id`. Additionally, the frontend
TypeScript definition for this event only allows for a `referrer` property, creating a
type mismatch that should fail compilation. This discrepancy will cause the analytics
event to be recorded incorrectly, as the data sent from the frontend does not match the
schema expected by the backend.

Did we get this right? 👍 / 👎 to inform future reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant