bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 57 forks source link

Namerequest UI: wrong legal type while creating a Continuation In numbered company #21033

Open riyazuddinsyed opened 1 week ago

riyazuddinsyed commented 1 week ago

Describe the bug in the current situation When the user tries to create a numbered Continuation In filing then the 401 unauthorized error shows up and in the legal APi Draft response the legal type is wrong.

Steps to reproduce the behavior:

  1. Go to 'https://dev.bcregistry.ca/business/'
  2. Login with BCREGA001/98900001
  3. Navigate to NR and create a Numbered Cont In
  4. Upon hitting on Incorporate Now the UI throws an Invalid filing error.

Screenshots/ Visual Reference/ Source

Screen Shot 2024-04-26 at 12.25.44 PM.png
severinbeauvais commented 1 week ago

@OlgaPotiagalova We will need to pull in this bug ticket soon. (Maybe it can wait until next sprint.)

severinbeauvais commented 1 week ago

I quickly investigated this bug and found that the list of business types for Continuation In uses the wrong entity types. I believe the following dialog is correct:

image.png

But the code are wrong:

image.png

The correct codes are C, CBEN, CCC, CUL, etc.

OlgaPotiagalova commented 1 week ago

@severinbeauvais please go ahead with the ticket if it needs to be fixed this sprint to ensure progress. Thank you

severinbeauvais commented 1 week ago

IGNORE THE FOLLOWING TEST NOTES, WHICH APPLIED TO AN INITIAL (NOW ABANDONED) SOLUTION. SEE NEW TEST NOTES BELOW.

~Test Notes~

~Since this bugfix touches common code, the entity lists should be verified, for example the "New Business" list of entities:~

image.png

~The main fix, of course, was to the entity list for continuation in NRs:~

short list

image.png

full list

image.png

~What you can't tell from these lists is which entityType is assigned to each type of entity for a NR. The way to test this is to create NRs of each type, for each entity type, and looking at the raw data in the Dev Tools Network tab.~

~Specifically, for a New Business NR, the entityType values should be CR, BC, CC, and ULC.~

~Specifically, for a Continuation In NR, the entityType values should be C, CBEN, CCC, CUL (and also CP for coops and CS for socities).~

~The final test is to verify that the reported bug is fixed -- you are able to create numbered Limited Company Continuation In applications from Namerequest UI.~

~I have tested the above locally.~

severinbeauvais commented 6 days ago

New Test Notes

A simpler solution was implemented, which only sets the correct entity type (eg, C/CBEN/CCC/CUL) when a numbered Continuation In draft is created.

For a Continuation In NR, the previous code was unchanged. (In this case, Namex API populates the correct entity type.)

Specifically, please verify:

I have verified the above locally and on the PR preview site.

severinbeauvais commented 5 days ago

@ozamani9gh @stevenc987 Please tag this ticket to your next Namerequest UI release. It would be nice to have this in Test but no rush to get it into Prod as it's disabled by feature flag for now anyway.