Skip to content
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

Migration fails on items with persistSourceMigration and effect migrations #4276

Closed
arbron opened this issue Sep 16, 2024 · 0 comments · Fixed by #4277
Closed

Migration fails on items with persistSourceMigration and effect migrations #4276

arbron opened this issue Sep 16, 2024 · 0 comments · Fixed by #4277
Assignees
Labels
bug Functionality which is not working as intended migration The feature involves a system migration
Milestone

Comments

@arbron
Copy link
Collaborator

arbron commented Sep 16, 2024

When the persist source migration flag is applied, it can cause issues with partial migration data in effects because mergeObject doesn't properly merge the full effects array and partial effects changes array.

@arbron arbron added bug Functionality which is not working as intended migration The feature involves a system migration labels Sep 16, 2024
@arbron arbron added this to the D&D5E 4.0.2 milestone Sep 16, 2024
@arbron arbron self-assigned this Sep 16, 2024
arbron added a commit that referenced this issue Sep 16, 2024
When the `persistSourceMigration` flag was enabled it updates an
item with `diff: false`, but when an effect migration is applied
the update data contains only partial updates for effects. This
would result in the system attempting to update effects without
most of their data leading to an error.

This fix resolves this isssue by manually merging changes with
the original effect data before performing the full merge.

Closes #4276
arbron added a commit that referenced this issue Sep 17, 2024
[#4276] Fix effect bug caused by `persistSourceMigration`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality which is not working as intended migration The feature involves a system migration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant