-
Notifications
You must be signed in to change notification settings - Fork 8
Fix/cmg-723 #812
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/cmg-723 #812
Conversation
…erence entries and fix referenceTo typo in ContentMapper components acheiving selection of default CT in reference field advance setting
…e UID formatting in uidCorrector function for dynamic attachement of values in boolean 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.
Pull Request Overview
This PR implements a fix for issue CMG-723, addressing typos in property names and improving file handling operations. The changes focus on correcting "referenceTo" to "refrenceTo" across multiple files and modernizing asynchronous file operations.
Key changes:
- Fixes spelling of reference property names across UI components and interfaces
- Modernizes file system operations from callback-based to Promise-based APIs
- Enhances entry processing logic with improved reference handling and mapping
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| upload-api/migration-aem/helper/index.ts | Adds camelCase to snake_case conversion in UID correction |
| ui/src/components/ContentMapper/index.tsx | Updates property name from "referenceTo" to "refrenceTo" |
| ui/src/components/ContentMapper/contentMapper.interface.ts | Updates interface property name from "referenceTo" to "refrenceTo" |
| ui/src/components/AdvancePropertise/index.tsx | Updates property access from "referenceTo" to "refrenceTo" |
| api/src/services/aem.service.ts | Modernizes file operations and improves entry processing logic |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| useEffect(() => { | ||
| tableData?.forEach((field) => { | ||
| if(field?.backupFieldType === 'reference' && field?.referenceTo?.length === 0) { | ||
| if(field?.backupFieldType === 'reference' && field?.refrenceTo?.length === 0) { |
Copilot
AI
Oct 15, 2025
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.
Property name 'refrenceTo' appears to be a misspelling of 'referenceTo'.
| if(field?.backupFieldType === 'reference' && field?.refrenceTo?.length === 0) { | |
| if(field?.backupFieldType === 'reference' && field?.referenceTo?.length === 0) { |
| const updatedRow = { | ||
| ...row, | ||
| referenceTo: updatedSettings?.referenedItems, | ||
| refrenceTo: updatedSettings?.referenedItems, |
Copilot
AI
Oct 15, 2025
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.
Property name 'refrenceTo' appears to be a misspelling of 'referenceTo'.
| refrenceTo: updatedSettings?.referenedItems, | |
| referenceTo: updatedSettings?.referenedItems, |
| _invalid?: boolean; | ||
| backupFieldUid: string; | ||
| referenceTo: string[]; | ||
| refrenceTo: string[]; |
Copilot
AI
Oct 15, 2025
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.
Property name 'refrenceTo' appears to be a misspelling of 'referenceTo'.
| refrenceTo: string[]; | |
| referenceTo: string[]; |
| })); | ||
|
|
||
| const referencedItems = props?.data?.referenceTo?.map((item: string) => ({ | ||
| const referencedItems = props?.data?.refrenceTo?.map((item: string) => ({ |
Copilot
AI
Oct 15, 2025
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.
Property name 'refrenceTo' appears to be a misspelling of 'referenceTo'.
| const referencedItems = props?.data?.refrenceTo?.map((item: string) => ({ | |
| const referencedItems = props?.data?.referenceTo?.map((item: string) => ({ |
| case 'boolean': { | ||
| const value = items?.[field?.uid]; | ||
| const uid = getLastKey(field?.contentstackFieldUid); | ||
| const aemFieldName = field?.otherCmsField ? getLastKey(field.otherCmsField, ' > ') : getLastKey(field?.uid); |
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.
add field?.otherCmsField
No description provided.