Skip to content

fix(utils): add support for Tag entity type in updateDestinationWithSourceData - #3360

Open
Alireza Aghaee (AlirezaAghaee1996) wants to merge 1 commit into
contentful:mainfrom
AlirezaAghaee1996:fix/issue-3328
Open

Alireza Aghaee (AlirezaAghaee1996) wants to merge 1 commit into
contentful:mainfrom
AlirezaAghaee1996:fix/issue-3328

Conversation

@AlirezaAghaee1996

Copy link
Copy Markdown

🤖 Autonomous Contribution by OpenSourcePilot

Summary of Changes

Resolves #3328: Updating existing Tags fails with "updateDestinationWithSourceData: unsupported type Tag" (regression since 10.2.0)

🔍 Root Cause Analysis

The updateDestinationWithSourceData utility function lacks handling for the Tag entity type (when sys.type is 'Tag'). When importing tags into a space where tags already exist, the importer attempts to merge source tag properties into destination tags, throwing an unsupported type error for Tag.

🛠 Solution Strategy

Add explicit handling for entity type 'Tag' in updateDestinationWithSourceData (or the corresponding entity updater module) so that mutable tag fields (such as name) are copied from the source entity to the destination tag entity prior to updating.

📁 Modified Files

  • lib/utils/update-destination-with-source-data.js (modify)
  • test/unit/utils/update-destination-with-source-data.test.js (modify)

🧪 Verified Test Results

Verified 100% assertions satisfied in Docker test harness

This Pull Request was generated autonomously by OpenSourcePilot after passing an isolated Docker verification test suite and independent automated code review.

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.

Updating existing Tags fails with "updateDestinationWithSourceData: unsupported type Tag" (regression since 10.2.0)

1 participant