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

fix(DeliveryRequestApiService): filter deliveries requested by partner role and incoterms #435

Merged

Conversation

tom-rm-meyer-ISST
Copy link
Contributor

@tom-rm-meyer-ISST tom-rm-meyer-ISST commented Jun 3, 2024

Description

resolves #432

Maybe we need also to do similar enhancements to the following fields

  • DeliveryService / OwnDeliveryService
  • Frontend > incoterm and partner relationship including current role in dashboard (not sure, if we already have it but I think there is something in place)

Please let me know what you think. Based on the changes I would release a patch version

Pre-review checks

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

Copy link
Contributor

@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.

Thank you for your contribution.

Overall solid work, but besides a comment I left on a bug there seems to be an issue with how the material is retrieved in handleDeliverySubmodelRequest. There is a disconnect between the comment and what is actually happening.

At first we attempt to find the material by assuming that we are supplier and the Cx number is our own. If this fails we should check if we are customer and the Cx number matches the partnerCxNumber in any mpr for that partner. only if that fails we should triggerPartTypeRetrieval and afterwards check the mpr again.

Currently we do not check the mpr at all so we can not handle requests where we are the customer.

@tom-rm-meyer-ISST
Copy link
Contributor Author

tom-rm-meyer-ISST commented Jun 4, 2024

Thank you for your contribution.

Overall solid work, but besides a comment I left on a bug there seems to be an issue with how the material is retrieved in handleDeliverySubmodelRequest. There is a disconnect between the comment and what is actually happening.

At first we attempt to find the material by assuming that we are supplier and the Cx number is our own. If this fails we should check if we are customer and the Cx number matches the partnerCxNumber in any mpr for that partner. only if that fails we should triggerPartTypeRetrieval and afterwards check the mpr again.

Currently we do not check the mpr at all so we can not handle requests where we are the customer.

Well seen! While implementing the change and a test to get this scenario tested, I recognized that this might even be unwanted behavior: If we don't have the CX ID when being customer, this means we did not create a Shell Descriptor with a href. Someone tries to access data directly via the asset / interface without the DTR to see how to access the data.

I added a warning message as I think this could be a security issue, if a partner tries to do that.

Copy link
Contributor

@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.

Looks good to me. Thank you for your efforts.

@tom-rm-meyer-ISST
Copy link
Contributor Author

Bumped version to create a patch release

@tom-rm-meyer-ISST tom-rm-meyer-ISST merged commit c2d02c5 into eclipse-tractusx:main Jun 5, 2024
13 checks passed
@tom-rm-meyer-ISST tom-rm-meyer-ISST deleted the fix/432-delivery branch June 5, 2024 11:30
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.

Customer can't refresh Delivery Information
3 participants