Skip to content

Improve PDM default LineItem#6

Open
schiwekM wants to merge 4 commits intomainfrom
fix/improve-information-table
Open

Improve PDM default LineItem#6
schiwekM wants to merge 4 commits intomainfrom
fix/improve-information-table

Conversation

@schiwekM
Copy link
Copy Markdown
Contributor

  • Only show data subject ID in field group not in the LineItem because the navigation is via the DataSubject and thus it is redundant info
  • Add localised labels for default field group headers

@schiwekM schiwekM requested a review from a team as a code owner April 11, 2026 10:13
@hyperspace-insights
Copy link
Copy Markdown

Summary

The following content is AI-generated and provides a summary of the pull request:


Improve PDM Default LineItem Annotations

Refactor

♻️ Refactored the default LineItem and FieldGroup annotation generation for PDM information entities to reduce redundancy and improve maintainability.

Changes

  • _i18n/i18n.properties: Added localized labels INFORMATION_DATA_SUBJECT_DETAILS and INFORMATION_DETAILS to replace hardcoded English strings in field group headers.

  • lib/csn-enhancements/information/enhanceAnnotations.js:

    • Extracted the field-building logic into a reusable getFields(entity, excludingFields) function, removing duplicated inline code.
    • Updated assignInformationAnnotations to accept an excludingFields array (defaulting to []) instead of a dsFields object.
    • The default @UI.LineItem now excludes the Data Subject ID field (via _getDataSubjectIDField) since navigation already happens via the DataSubject, making it redundant.
    • The default @UI.FieldGroup data now uses getFields() directly instead of referencing the computed LineItem, allowing the field group to still include the Data Subject ID.
    • Replaced hardcoded label strings ("Data subject details", "Details") with i18n references ({i18n>INFORMATION_DATA_SUBJECT_DETAILS}, {i18n>INFORMATION_DETAILS}).
  • lib/csn-enhancements/information/exposeEntity.js: Updated call to assignInformationAnnotations to pass [fields.eob] as the excluding fields array instead of the full fields object.

  • lib/csn-enhancements/shared/compositionsRewrite.js: Similarly updated the call to assignInformationAnnotations to pass [newDsFields.eob].

  • tests/bookshop-app/db/schema.cds: Fixed empty @title annotations on Payments and Marketing test entities, replacing '' with meaningful values ('Payments' and 'Marketing').


  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.20.11 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • Output Template: Default Template
  • Event Trigger: pull_request.opened
  • Correlation ID: 0d843680-358f-11f1-8250-3b343e075e73
  • LLM: anthropic--claude-4.6-sonnet
  • Summary Prompt: Default Prompt
  • File Content Strategy: Full file content

💌 Have ideas or want to contribute? Create an issue and share your thoughts with us!
📑 Check out the documentation for more information.
📬 Subscribe to the Hyperspace PR Bot DL to get the latest announcements and pilot features!

Made with ❤️ by Hyperspace.

Copy link
Copy Markdown

@hyperspace-insights hyperspace-insights bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR introduces a useful refactor (extracting getFields) and adds i18n labels, but has a critical correctness bug in exposeEntity.js where fields.eob is always undefined, meaning the DataSubject ID field is never actually excluded from the generated @UI.LineItem — defeating the main goal of the PR. There is also a related defensive issue in enhanceAnnotations.js where undefined can silently leak into the excludingFields array.

PR Bot Information

Version: 1.20.11 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • LLM: anthropic--claude-4.6-sonnet
  • File Content Strategy: Full file content
  • Correlation ID: 0d843680-358f-11f1-8250-3b343e075e73
  • Event Trigger: pull_request.opened

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