Open rogocof opened 3 months ago
This was discussed in https://github.com/eclipse-tractusx/traceability-foss/issues/774 and https://github.com/eclipse-tractusx/traceability-foss/issues/849 The result of the dicsussion and the created concept is the following: When creating a notification with parts from multiple different suppliers, a separate notification will be created for each supplier. In a single notification, there will be no possibility to have multiple "sendTo" receivers anymore. That will solve this issue and it will be implemented with the tickets https://github.com/eclipse-tractusx/traceability-foss/issues/899 (backend) and https://github.com/eclipse-tractusx/traceability-foss/issues/900 (frontend)
Links
Description
An Investigation which was started for multiple parts from different suppliers only shows one receiver in the UI and the API response payload.
Current behaviour
Only one receiver is named under "Send To BPN" in the UI. (See red mark on screenshot)
In database there are one entry for a new investigation and two entries for investigation_notifications created for this case. From database perspective the logic works fine. However the filter API for investigation returns an InvestigationResponse object which has a "sendTo" field with type String. The value for this field is mapped in the InvestegationResponseMapper class by taking the first notification and taking its "sendTo" value:
![image](https://github.com/eclipse-tractusx/traceability-foss/assets/158559825/a1af3b26-3e2c-4e71-b4f8-f3acd750dd90)
Expected behavior
A list of string is returned for the sendTo field is returned from the API and visualized in the UI because an Investigation can have multiple receivers.
Steps to reproduce the Bug