Skip to content

fix: survey actions #33013

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

Merged
merged 1 commit into from
Jun 3, 2025
Merged

fix: survey actions #33013

merged 1 commit into from
Jun 3, 2025

Conversation

lucasheriques
Copy link
Contributor

@lucasheriques lucasheriques commented Jun 2, 2025

Problem

survey triggered by actions are currently disabled because they break the surveyForm logic.

The reason this is happening is because it relies on an logic that is not necessarily mounted within the Surveys logic.

Changes

Make sure to initialize the actionsModel logic, by using useMountedLogic. This will allow us to re-enabled action triggers on surveys, which was also recently requested in a support ticket.

Otherwise, when someone tries to add an action to a survey, it causes the form to crash

@lucasheriques lucasheriques requested a review from a team June 2, 2025 18:51
@lucasheriques lucasheriques self-assigned this Jun 2, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Added proper mounting of the actions model in the SurveyEdit component to fix survey actions functionality.

  • Added useMountedLogic(actionsModel) hook in frontend/src/scenes/surveys/SurveyEdit.tsx to ensure actions model is properly initialized
  • This change ensures survey actions work correctly when users perform actions that should trigger surveys

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

github-actions bot commented Jun 2, 2025

Size Change: 0 B

Total Size: 3.74 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 3.74 MB

compressed-size-action

@marandaneto
Copy link
Member

make survey actions work

what does not work?

@lucasheriques lucasheriques merged commit c4762c7 into master Jun 3, 2025
101 checks passed
@lucasheriques lucasheriques deleted the fix/survey-actions branch June 3, 2025 15:13
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.

2 participants