Skip to content

Conversation

@shobhitupadhyayy
Copy link
Contributor

… aem.service.ts to support string and object types for content

… aem.service.ts to support string and object types for content
@shobhitupadhyayy shobhitupadhyayy requested a review from a team as a code owner October 15, 2025 11:34
…elds to AssetJSON interface, implementing helper functions for HTML sanitization and field value extraction, and improving asset deduplication logic

Resolved Bugs -
CMG-743
CMG-747
CMG-748
CMG-758
@umeshmore45 umeshmore45 requested a review from Copilot October 28, 2025 10:38
Copy link
Contributor

@sayalijoshi27 sayalijoshi27 left a comment

Choose a reason for hiding this comment

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

Add null checks in both the files and resolve security scan failed test

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 enhances JSON handling in the AEM service to support both string and object content types, and introduces UID normalization across field mappings to ensure consistent UID formatting throughout the migration process.

Key changes:

  • Added normalizeFieldUids function with recursive UID correction for field mappings, blocks, and schema items
  • Refactored asset deduplication logic to use filename-based tracking instead of creating duplicates
  • Enhanced field processing to support flexible content types (string/object) in JSON RTE fields

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
upload-api/migration-aem/helper/fieldMappings.merge.ts Introduces UID normalization functions and integrates them into content model processing pipeline
api/src/services/aem.service.ts Refactors asset creation to deduplicate by filename, adds helper functions for field value extraction and HTML sanitization, and enhances field type handling with support for flexible content types

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sayalijoshi27 sayalijoshi27 merged commit ea3ae33 into dev Oct 28, 2025
7 checks passed
@sayalijoshi27 sayalijoshi27 deleted the fix/CMG-723 branch October 28, 2025 11:54
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