Skip to content

Conversation

@shobhitupadhyayy
Copy link
Contributor

No description provided.

…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
@shobhitupadhyayy shobhitupadhyayy requested a review from a team as a code owner October 15, 2025 09:28
@umeshmore45 umeshmore45 requested a review from Copilot October 15, 2025 09:30
Copy link
Contributor

Copilot AI left a 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) {
Copy link

Copilot AI Oct 15, 2025

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'.

Suggested change
if(field?.backupFieldType === 'reference' && field?.refrenceTo?.length === 0) {
if(field?.backupFieldType === 'reference' && field?.referenceTo?.length === 0) {

Copilot uses AI. Check for mistakes.
const updatedRow = {
...row,
referenceTo: updatedSettings?.referenedItems,
refrenceTo: updatedSettings?.referenedItems,
Copy link

Copilot AI Oct 15, 2025

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'.

Suggested change
refrenceTo: updatedSettings?.referenedItems,
referenceTo: updatedSettings?.referenedItems,

Copilot uses AI. Check for mistakes.
_invalid?: boolean;
backupFieldUid: string;
referenceTo: string[];
refrenceTo: string[];
Copy link

Copilot AI Oct 15, 2025

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'.

Suggested change
refrenceTo: string[];
referenceTo: string[];

Copilot uses AI. Check for mistakes.
}));

const referencedItems = props?.data?.referenceTo?.map((item: string) => ({
const referencedItems = props?.data?.refrenceTo?.map((item: string) => ({
Copy link

Copilot AI Oct 15, 2025

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'.

Suggested change
const referencedItems = props?.data?.refrenceTo?.map((item: string) => ({
const referencedItems = props?.data?.referenceTo?.map((item: string) => ({

Copilot uses AI. Check for mistakes.
case 'boolean': {
const value = items?.[field?.uid];
const uid = getLastKey(field?.contentstackFieldUid);
const aemFieldName = field?.otherCmsField ? getLastKey(field.otherCmsField, ' > ') : getLastKey(field?.uid);
Copy link
Contributor

Choose a reason for hiding this comment

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

add field?.otherCmsField

@sayalijoshi27 sayalijoshi27 merged commit 42fe960 into dev Oct 15, 2025
7 checks passed
@sayalijoshi27 sayalijoshi27 deleted the fix/CMG-723 branch October 15, 2025 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants