Skip to content

Fix attachment path resolution for deeply nested compositions - #574

Closed
PujaDeshmukh17 wants to merge 1 commit into
Release_v1.10.2from
Release_v1.10.3-SNAPSHOT
Closed

Fix attachment path resolution for deeply nested compositions#574
PujaDeshmukh17 wants to merge 1 commit into
Release_v1.10.2from
Release_v1.10.3-SNAPSHOT

Conversation

@PujaDeshmukh17

@PujaDeshmukh17 PujaDeshmukh17 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixed an upload issue where attachment path mappings were incorrectly resolved for entities with deeply nested compositions (e.g., Entity → Sections → attachments)
Introduced recursive path traversal (findPathToEntity) to correctly build the actual upload path when an attachment belongs to an intermediate entity rather than the direct target entity
Updated buildActualPath to accept targetEntity and distinguish between direct and nested attachment ownership before constructing the path
Updated buildEntityPath to use the attachmentPath as-is for nested attachments, ensuring uniqueness at any composition depth

Root Cause

The previous logic always built the actual path using parentEntity + compositionPropertyName + attachmentPart, which was incorrect when the attachment was owned by an intermediate composition (not the direct target entity). This caused path mismatches during upload.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist before requesting a review

  • I follow Java Development Guidelines for SAP
  • I have tested the functionality on my cloud environment.
  • I have provided sufficient automated/ unit tests for the code.
  • I have increased or maintained the test coverage.
  • I have ran integration tests on my cloud environment.
  • I have validated blackduck portal for any vulnerability after my commit.

Upload Screenshots/lists of the scenarios tested

  • I have Uploaded Screenshots or added lists of the scenarios tested in description

@hyperspace-pr-bot

Copy link
Copy Markdown
Contributor

👋 Hi — I'm PR Bot, your SAP code review assistant.

I'll automatically review your pull requests for code quality, security, and SAP compliance. Get an overview of what I do →

What I do

  • Summarize your pull request changes
  • Review code for quality, correctness, and reliability
  • Suggest fixes when a pipeline job fails

Key commands

Command Description
/review [--all] Trigger a code review. Add --all to include files excluded by excluded_paths.
/summarize Generate a PR summary
/ask <question> Ask about the current changes
/help See all available commands
Configure me for your team

Create .hyperspace/pull_request_bot.json in your repository:

{
  "$schema": "https://devops-insights-pr-bot.cfapps.eu10-004.hana.ondemand.com/schema/pull_request_bot.json",
  "features": {
    "control_panel": false,
    "summarize": {
      "auto_generate_summary": true,
      "auto_insert_summary": true,
      "auto_run_on_draft_pr": true,
      "use_custom_summarize_prompt": false,
      "use_custom_summarize_output_template": false,
      "excluded_paths": [],
      "auto_exclude_authors": []
    },
    "review": {
      "auto_generate_review": true,
      "auto_run_on_draft_pr": false,
      "use_custom_review_focus": false,
      "excluded_paths": [],
      "auto_exclude_authors": []
    },
    "sonar_fix": {
      "enable": true,
      "excluded_rules": []
    },
    "pipeline_fix": {
      "enable": true
    }
  },
  "excluded_paths": []
}

Full configuration reference →

*This introduction message will be shown to you only once, you will not see it in future PRs.

@PujaDeshmukh17 PujaDeshmukh17 changed the title Fix for uploading issue Fix attachment path resolution for deeply nested compositions Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant