Skip to content
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

Fix use as draft #9718

Merged
merged 15 commits into from
Jan 21, 2025
Merged

Fix use as draft #9718

merged 15 commits into from
Jan 21, 2025

Conversation

martmull
Copy link
Contributor

@martmull martmull commented Jan 17, 2025

  • remove delete serverless function when archiving workflow version
  • update copy serverless function to reset serverless function to old version
  • remove createNewWorkflowVersion and use createDraftFromWorkflowVersion
  • fix step update issue and optimistic rendering when generate draft from active version

@martmull martmull marked this pull request as ready for review January 21, 2025 11:14
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 refactors workflow version management by replacing the manual creation process with a dedicated draft creation system.

  • Replaced useCreateNewWorkflowVersion with useCreateDraftFromWorkflowVersion in /packages/twenty-front/src/modules/workflow/hooks/useGetUpdatableWorkflowVersion.ts
  • Modified createDraftFromWorkflowVersion mutation in /packages/twenty-front/src/modules/workflow/graphql/mutations/createDraftFromWorkflowVersion.ts to return workflowVersionId
  • Changed serverless function handling in /packages/twenty-server/src/modules/workflow/common/workspace-services/workflow-version-step.workspace-service.ts to reset to old versions instead of copying
  • Added WorkflowVersionDTO in /packages/twenty-server/src/engine/core-modules/workflow/dtos/workflow-version.dto.ts to standardize version responses
  • Updated workflow step hooks to work with version IDs instead of full version objects for better optimistic updates

20 file(s) reviewed, 10 comment(s)
Edit PR Review Bot Settings | Greptile

@martmull martmull merged commit ed7c48e into main Jan 21, 2025
47 checks passed
@martmull martmull deleted the fix-use-as-draft branch January 21, 2025 14:44
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