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

Add fields to update in update record action #9108

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

thomtrp
Copy link
Contributor

@thomtrp 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

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 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 to WorkflowUpdateRecordActionSettings to control which fields are updated
  • Added field selection UI with FormMultiSelectFieldInput in WorkflowEditActionFormUpdateRecord component
  • Enhanced MultiSelectInput and MultiSelectDisplay 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

@Devessier Devessier self-requested a review December 18, 2024 09:46
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.

It looks great! I have only one question about the static list of field types before we can merge.

Comment on lines +43 to +55
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,
];

Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense.

@Devessier Devessier self-requested a review December 18, 2024 10:20
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.

Another masterpiece by the pro developper @thomtrp. We can merge. Good job on the design of the multi select.

@thomtrp thomtrp force-pushed the tt-add-fields-to-update-in-update-action branch from 1bda1af to 57970fc Compare December 18, 2024 13:18
@thomtrp thomtrp enabled auto-merge (squash) December 18, 2024 13:29
@thomtrp thomtrp merged commit 9467621 into main Dec 18, 2024
22 checks passed
@thomtrp thomtrp deleted the tt-add-fields-to-update-in-update-action branch December 18, 2024 13:32
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.

3 participants