-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add fields to update in update record action #9108
Conversation
thomtrp
commented
Dec 17, 2024
- update backend action so it handles composite fields
- add fields to update multiselect
- generate form based on that field
- add icons
There was a problem hiding this 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 adds selective field updates to the workflow update record action, allowing users to specify which fields should be updated when modifying records.
Key changes:
- Added
fieldsToUpdate
array toWorkflowUpdateRecordActionSettings
to control which fields are updated - Added field selection UI with
FormMultiSelectFieldInput
inWorkflowEditActionFormUpdateRecord
component - Enhanced
MultiSelectInput
andMultiSelectDisplay
components with icon support for better field visualization - Modified backend
UpdateRecordWorkflowAction
to filter updates based on selected fields - Added support for composite fields in the workflow update record action
9 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile
packages/twenty-front/src/modules/ui/field/display/components/MultiSelectDisplay.tsx
Show resolved
Hide resolved
...rkflow-executor/workflow-actions/record-crud/types/workflow-record-crud-action-input.type.ts
Show resolved
Hide resolved
...les/workflow/workflow-executor/workflow-actions/record-crud/update-record.workflow-action.ts
Show resolved
Hide resolved
...ront/src/modules/workflow/workflow-actions/components/WorkflowEditActionFormUpdateRecord.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great! I have only one question about the static list of field types before we can merge.
const AVAILABLE_FIELD_METADATA_TYPES = [ | ||
FieldMetadataType.Text, | ||
FieldMetadataType.Number, | ||
FieldMetadataType.Date, | ||
FieldMetadataType.Boolean, | ||
FieldMetadataType.Select, | ||
FieldMetadataType.MultiSelect, | ||
FieldMetadataType.Emails, | ||
FieldMetadataType.Links, | ||
FieldMetadataType.FullName, | ||
FieldMetadataType.Address, | ||
]; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason behind this static list of field types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Devessier I do not want the user to select a field a do not see the form to be updated. That would look weird. Some fields such as Rating may not be implemented before we get our first users in Beta. I prefer adding this list and remove it once we have all fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another masterpiece by the pro developper @thomtrp. We can merge. Good job on the design of the multi select.
1bda1af
to
57970fc
Compare