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

Limitation in RegionCode Pattern results in failure while BPN Generation #121

Open
sourabhpatil178 opened this issue Feb 20, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@sourabhpatil178
Copy link

sourabhpatil178 commented Feb 20, 2024

With upgrade to Tractus-X 23.12 release, we are not able to onboard a new company into Portal as the Registration Service does not supports adding RegionCode/regionPattern for eg. DE-BY codes
According to regionPattern defined as /^[a-zA-Z0-9,"\s()']*$/ we can add Region as DEBY or DE BY or empty value, etc but it eventually results in failure at BPN Generation, since this region code is not defined/accepted in the BPDM Pool regions.
Thus, a new company onboarding results in failure.

Current Behavior

With Portal 1.7.0 release (Registration: 1.5.4) it is not possible to add region code in format like DE-BY.

image

Instead, we can pass/store the region code as: “DEBY” or “DE BY” .
And that’s what is causing the issue while Generating the BPN in the BPDM Pool.

Since we have passed the region code as: “DEBY” or “DE BY”, the BPDM fails to create a Legal Entity in BPDM Pool, with following error:

image

image

And if we pass empty region code, we get below error:

image image

For region as Berlin:

image

The BPDM release 3.1.2, now has region codes as:

image

Expected Behavior

Registration form should accept region DE-BY as valid entry and pass the same to Portal-backend (/api/registration/application/{application_id}/companyDetailsWithAddress)

image

It would be nice if we modify the regex as valid regionPattern to something like ^[a-zA-Z0-9,-"\s()']*$ which will allow region code with example like DE-BY

Tractus-x release: 23.12

Portal: 1.7.0
BPDM: 3.1.2

@sourabhpatil178 sourabhpatil178 added the bug Something isn't working label Feb 20, 2024
@Phil91 Phil91 added this to Portal Feb 23, 2024
@github-project-automation github-project-automation bot moved this to NEW USER REQUEST in Portal Feb 23, 2024
@jjeroch
Copy link
Contributor

jjeroch commented Mar 10, 2024

Interim fix provided by @ajithsimons .
Thanks @ajithsimons

Important: the pr does not fix the actual issue of unaligned components/unclear implementation. We need a clear check of the supported Regions and whether the BPDM regions are the official regions or if those are rather test data. The validation is needed and initiated for 24.05.

@jjeroch jjeroch self-assigned this Mar 10, 2024
@jjeroch jjeroch removed their assignment Jul 16, 2024
@MaximilianHauer
Copy link

MaximilianHauer commented Sep 6, 2024

@nicoprow should we have a talk on this ? see @jjeroch comment .
would it make sense that you provide us an endpoint where we could get the regioncode and support the customer to fill it e.h. dropdown ?

@ss-nikunj
Copy link

@MaximilianHauer I think you tagged me by mistake. 🙂

@MaximilianHauer MaximilianHauer moved this from NEW USER REQUEST to IN PROGRESS in Portal Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: IN PROGRESS
Development

No branches or pull requests

4 participants