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

DXCDT-374: Update field by address for keyword preservation #744

Merged

Conversation

willvedd
Copy link
Contributor

@willvedd willvedd commented Feb 14, 2023

🔧 Changes

Building off of the previous PRs for keyword preservation (#736, #738, #740, #741), this PR adds the updateAssetsByAddress function which will update a field on an arbitrary data structure when provided the address and the new value. This functionality is critical for keyword preservation because ultimately this is what will replace certain fields on the remote assets tree with the preserved fields of the local asset tree.

Example:

updateAssetsByAddress(
  { tenant: { friendly_name: 'Original friendly name' } },
  'tenant.friendly_name',
  'New friendly name'
); // { tenant: { friendly_name: 'New friendly name' } },

📚 References
Related Issues:

🔬 Testing
Added and updated unit tests.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@willvedd willvedd requested a review from a team as a code owner February 14, 2023 21:25
@willvedd willvedd merged commit e7521f3 into master Feb 21, 2023
@willvedd willvedd deleted the DXCDT-374-keyword-preservation-update-field-by-address branch February 21, 2023 22:24
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.

2 participants