Skip to content

Remove ID field + fix relations + remove runs #12796

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 23, 2025
Merged

Conversation

thomtrp
Copy link
Contributor

@thomtrp thomtrp commented Jun 23, 2025

  • id field should only be available for search records action
  • create record action does not work for relations. Requires to send accountOwner: { id: string } instead of accountOwner: string
  • hidding runs for version views as we did for workflows

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

This PR implements crucial fixes for workflow actions and version views, enhancing relation handling and field visibility.

  • Added proper relation formatting in packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionCreateRecord.tsx to handle many-to-one relations with {id: string} structure
  • Modified shouldDisplayFormField.ts to restrict ID field visibility to only FIND_RECORDS action type
  • Hidden 'runs' field in workflow versions view by setting isVisible: false in workflow-versions-all.view.ts
  • Improved type safety with new RelationManyToOneField type in action components
  • Added field definition validation before updates to prevent relation handling errors

4 files reviewed, 1 comment
Edit PR Review Bot Settings | Greptile

@thomtrp thomtrp force-pushed the tt-workflow-fixes-post-QA branch from 6050321 to ffe0f75 Compare June 23, 2025 15:30
Copy link
Contributor

github-actions bot commented Jun 23, 2025

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:17422

This environment will automatically shut down when the PR is closed or after 5 hours.

Copy link
Contributor

@Devessier Devessier left a comment

Choose a reason for hiding this comment

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

Great job! I left a small nitpick comment.

@@ -41,24 +41,30 @@ export const shouldDisplayFormField = ({
isTypeAllowedForAction =
fieldMetadataItem.type !== FieldMetadataType.RELATION ||
fieldMetadataItem.settings?.['relationType'] === 'MANY_TO_ONE';
break;
return (
isTypeAllowedForAction &&
Copy link
Contributor

Choose a reason for hiding this comment

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

If we redefine the isTypeAllowedForAction variable in each case of the switch statement, I wouldn't use a let anymore and would instead declare a constant in each case. Wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it still makes the assertion easier to read. And I cannot declare the variable into the switch 😓

@thomtrp thomtrp merged commit 06fddc2 into main Jun 23, 2025
57 checks passed
@thomtrp thomtrp deleted the tt-workflow-fixes-post-QA branch June 23, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants