fix(import): clarify global field reference-field warning message - #351
Open
harshitha-cstk wants to merge 1 commit into
Open
fix(import): clarify global field reference-field warning message#351harshitha-cstk wants to merge 1 commit into
harshitha-cstk wants to merge 1 commit into
Conversation
Reword the warning logged when a referenced content type is not yet imported so it no longer implies permanent data loss. The reference is deferred and restored later in the same run, so the previous "Removing the field from schema..." wording was misleading. DX-10153 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
naman-contentstack
approved these changes
Aug 18, 2026
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.
What
Rewords the warning logged during
cm:stacks:import/cm:stacks:clonewhen a global field references a content type that hasn't been imported yet.Before:
After:
Why (DX-10153)
DX-10153 reported that global fields permanently lose content-type reference fields during import/clone, with no restoration pass.
Investigation showed this is not a bug — the restoration already exists:
handlePendingGlobalFields→updatePendingGFs).Verified end-to-end: after import, all affected reference fields are present in the target stack and match the source.
cm:stacks:cloneruns the same import path, so it behaves identically.The actual problem was the misleading warning — "Removing the field from schema..." reads as permanent data loss even though the reference is restored moments later in the same run. This PR fixes only that wording.
Scope
packages/contentstack-import/src/utils/content-type-helper.ts.🤖 Generated with Claude Code