ref(forms): Migrate organization join request off deprecatedforms to scraps form#119194
Open
priscilawebdev wants to merge 11 commits into
Open
ref(forms): Migrate organization join request off deprecatedforms to scraps form#119194priscilawebdev wants to merge 11 commits into
priscilawebdev wants to merge 11 commits into
Conversation
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, ''), | ||
| }); |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before

After