Skip to content

feat: implement anonymized planned production output#1099

Merged
ReneSchroederLJ merged 8 commits intoeclipse-tractusx:feat/anonymized-data-exchangefrom
achtzig20:feat/planned-production-anonymized
Mar 20, 2026
Merged

feat: implement anonymized planned production output#1099
ReneSchroederLJ merged 8 commits intoeclipse-tractusx:feat/anonymized-data-exchangefrom
achtzig20:feat/planned-production-anonymized

Conversation

@jakoballgaier
Copy link
Contributor

@jakoballgaier jakoballgaier commented Mar 4, 2026

Description

resolves #1079

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

  • DEPENDENCIES are up-to-date. Dash license tool. Committers can open IP issues for restricted libs.
  • Copyright and license header are present on all affected files (TRG 7.02
  • Documentation Notice are present on all affected files (TRG 7.07)
  • If helm chart has been changed, the chart version has been bumped to either next major, minor or patch level (compared to released chart).
  • Changelog updated (changelog.md) with PR reference and brief summary.
  • Frontend version bumped, if needed (frontend/package.json, frontend/package-lock.json)
  • Backend version bumped, if needed (backend/pom.xml)
  • Open API specification updated, if controllers have been changed (use python script scripts/generate_openapi_yaml.py with running customer backend)

@jakoballgaier
Copy link
Contributor Author

@ReneSchroederLJ
Unfortunately I was not able to build the OpenAPI.yaml on MacOS. It would be nice if you could generate it :)

Copy link
Member

@ReneSchroederLJ ReneSchroederLJ left a comment

Choose a reason for hiding this comment

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

Overall great work. One minor thing on the db changelog and the tests need fixing. I will add the openAPI changes once everything else is done

databaseChangeLog:
- changeSet:
id: "1"
author: ReneSchroederLJ
Copy link
Member

Choose a reason for hiding this comment

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

Please update with your own GitHub user as author

}

@Test
void ownProductionToSamm_materialFlag_usesMprService() {
Copy link
Member

Choose a reason for hiding this comment

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

This test doesn't really make sense to me. ownProductionToSamm does not use the mprService

@jakoballgaier jakoballgaier self-assigned this Mar 6, 2026
Copy link
Member

@ReneSchroederLJ ReneSchroederLJ left a comment

Choose a reason for hiding this comment

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

The functionality itself works. Please change the target branch to feat/anonymized-data-exchange and rebase.

Also make sure the Unit tests are successful.

@jakoballgaier jakoballgaier changed the base branch from main to feat/anonymized-data-exchange March 6, 2026 14:32
@jakoballgaier jakoballgaier force-pushed the feat/planned-production-anonymized branch from 73b7522 to 3655b6e Compare March 6, 2026 15:16
Copy link
Member

@ReneSchroederLJ ReneSchroederLJ left a comment

Choose a reason for hiding this comment

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

I found some more small issues. Please fix.

Also please resolve conflicts and add the missing openAPI changes

return ResponseEntity.ok(samm);
}

@Operation(summary = "This endpoint receives the Planned Production Submodel 2.0.0 requests. " +
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@Operation(summary = "This endpoint receives the Planned Production Submodel 2.0.0 requests. " +
@Operation(summary = "This endpoint receives the Anonymized Planned Production Submodel 1.0.0 requests. " +

- changeSet:
id: "1"
author: ReneSchroederLJ
author: jakoballgaier
Copy link
Member

Choose a reason for hiding this comment

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

revert changed author please

assertNotNull(pos.getAllocatedPlannedProductionOutputs());
assertEquals(1, pos.getAllocatedPlannedProductionOutputs().size());
AllocatedPlannedProductionOutput p = pos.getAllocatedPlannedProductionOutputs().iterator().next();
assertEquals("BPNS123456789012", p.getProductionSiteBpns());
Copy link
Member

Choose a reason for hiding this comment

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

what about assertions for the other properties of production?

assertNotNull(samm);
assertTrue(samm.getMaterialGlobalAssetIdAnonymized().startsWith("enc:"));
assertNotNull(samm.getAllocatedPlannedProductionOutputs());
assertEquals(1, samm.getAllocatedPlannedProductionOutputs().size());
Copy link
Member

Choose a reason for hiding this comment

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

Same as above. The test should make sure that all properties of production are set properly.

CHANGELOG.md Outdated
- Added update flow to Material Details View buttons ([#1034](https://github.com/eclipse-tractusx/puris/pull/1034))
- Added submodel implementation for delivery information anyonymized ([#1095](https://github.com/eclipse-tractusx/puris/pull/1095))
- Added submodel implementation for item stock anyonymized ([#1096](https://github.com/eclipse-tractusx/puris/pull/1096))
- Added submodel implementation for planned production output anyonymized ([#1099](https://github.com/eclipse-tractusx/puris/pull/1099))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- Added submodel implementation for planned production output anyonymized ([#1099](https://github.com/eclipse-tractusx/puris/pull/1099))
- Added submodel implementation for planned production output anonymized ([#1099](https://github.com/eclipse-tractusx/puris/pull/1099))

fix all 3 instances please

Copy link
Member

@ReneSchroederLJ ReneSchroederLJ left a comment

Choose a reason for hiding this comment

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

Works well just missed a small possible log injection.

@PathVariable String materialNumberCx,
@PathVariable String representation
) {
log.info("Received request for Anonymized Planned Production with materialNumberCx: {} and representation: {} from bpnl: {}", materialNumberCx, representation, bpnl);
Copy link
Member

Choose a reason for hiding this comment

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

Please remove this log as it happens before any pattern matching is done and presents actual risk for log injection. My bad for missing this previously.

Copy link
Member

@ReneSchroederLJ ReneSchroederLJ left a comment

Choose a reason for hiding this comment

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

The functionality works well now.

Please bump the helm and app versions to 7.0.0 and 6.0.0. respectively. Don't forget to also update the versions in the helm README.md and move the changes for this feature branch to a new changelog section

@ReneSchroederLJ ReneSchroederLJ merged commit f81e5eb into eclipse-tractusx:feat/anonymized-data-exchange Mar 20, 2026
12 checks passed
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.

[Story] Anonymized Planned Production Output

2 participants