fix(zendesk): warn on custom-field name collisions#312
Merged
christophebrun-forest merged 2 commits intoMay 22, 2026
Conversation
Skip Zendesk custom fields whose key collides with a native column or relation (e.g. a user_field named "role") and log a warning, so agent setup is not blocked. The filtered list flows back into the datasource search-mapping to keep schema and query translation in sync. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
forest-bot
added a commit
that referenced
this pull request
May 22, 2026
## [1.30.4](v1.30.3...v1.30.4) (2026-05-22) ### Bug Fixes * **zendesk:** warn on custom-field name collisions ([#312](#312)) ([b1274e9](b1274e9))
Member
|
🎉 This PR is included in version 1.30.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
role) used to crash agent setup withField role already defined in collection (RuntimeError).ForestAdminDatasourceZendesk.logger, so agent setup keeps going.Test plan
bundle exec rspecinpackages/forest_admin_datasource_zendesk— 238 examples, 0 failures.bundle exec rubocop lib/ spec/— clean.user_spec.rbcover therolecollision (warning emitted, native enum schema preserved, native value not overwritten by serializer).🤖 Generated with Claude Code
Note
Warn and skip custom fields that collide with native field names in Zendesk collections
add_custom_fieldstoBaseCollectionthat checks each custom field against the existing schema, logs a warning on collision, and skips the conflicting field.Ticket,User, andOrganizationcollections to useadd_custom_fieldsinstead of registering custom fields directly indefine_schema, so@custom_fieldsonly contains fields actually added.Datasource#build_custom_field_mappingto derive the mapping from the filtered@custom_fieldson each collection rather than raw introspection arrays.roleonUser) can no longer be silently overwritten by a colliding custom field during serialization.Macroscope summarized 3810cf0.