-
Notifications
You must be signed in to change notification settings - Fork 96
fix(data-mapper-v2): resolve XML attribute paths when loading saved maps #8770
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
base: main
Are you sure you want to change the base?
Conversation
When deserializing data maps containing XML attribute bindings within loops, the relative attribute path format './@AttributeName' was not being properly resolved back to the full schema node key. This caused "Source schema node not found" errors when reloading saved maps. The fix normalizes './@' prefixed paths by stripping the './' before constructing the full schema path lookup. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
❌ Commit Type
❌ Risk Level
✅ What & Why
❌ Impact of Change
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | Keep as-is |
| Commit Type | ❌ | Add template commit-type and select fix |
| Risk Level | ❌ | Add template risk-level and set Low; add risk:low label |
| What & Why | ✅ | Move Summary into the ## What & Why section |
| Impact of Change | ❌ | Add Impact of Change section (Users/Developers/System) |
| Test Plan | Convert to template checkboxes and include CI run info; you re-enabled a test which is visible in the diff | |
| Contributors | Optional — add credits if applicable | |
| Screenshots/Videos | Not applicable — OK to omit |
Final notes
- Advised risk level: low (the change is small: normalization of attribute paths and re-enabling a skipped test; 4 additions / 3 deletions across 2 files). The PR did not declare a risk level or include a
risk:*label — please addrisk:lowto the PR labels and markLowin the template. - Tests: The diff shows you re-enabled a skipped test (good). Please make sure CI has run and is green; link to the passing CI run in the PR description or add a short sentence "CI passed: ".
Please update the PR body to match the required template (add Commit Type and Risk Level with checkboxes and label, add Impact of Change, convert Test Plan to checkboxes with CI evidence, and optionally add Contributors). After updating, re-request review.
Thank you for the clear description and the small focused fix — once the template fields and label are added this PR should be ready to merge.
Last updated: Sat, 31 Jan 2026 02:13:52 GMT
There was a problem hiding this 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 fixes a bug where the Data Mapper v2 fails to load saved maps containing XML attribute bindings within loops. The error occurred because relative attribute paths (./@AttributeName) were not being properly resolved during deserialization, resulting in malformed paths like /loop/path/./@Attr instead of /loop/path/@Attr.
Changes:
- Added normalization logic to strip the
./prefix from./@attribute paths when resolving relative keys within loops - Re-enabled a previously skipped test case that validates this exact scenario
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| libs/data-mapper-v2/src/mapHandling/MapDefinitionDeserializer.ts | Added path normalization in getSourceNodeForRelativeKeyInLoop() to handle ./@ attribute patterns correctly by stripping the ./ prefix before path construction |
| libs/data-mapper-v2/src/mapHandling/test/MapDefinitionDeserializer.spec.ts | Re-enabled test case that validates looping connections with index variables, conditionals, and relative attribute paths |
|
📊 Coverage check completed. See workflow run for details. |
Summary
./@AttributeName) were not being properly resolved during deserialization/loop/path/./@Attrinstead of/loop/path/@AttrChanges
getSourceNodeForRelativeKeyInLoop()to strip./prefix from./@attribute pathsTest plan
🤖 Generated with Claude Code