bcgov / entity

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

Edit UI: full restoration bugs (date fields, approval type) #16500

Open severinbeauvais opened 1 year ago

severinbeauvais commented 1 year ago

This is related to #16081 and #16155.

If the todos below get done quickly, see also bugs in #16079 and #16080.

UXPin: https://preview.uxpin.com/306da47387722817e24fc77fd71476a1869a05fe#/pages/160541351/simulate/sitemap

severinbeauvais commented 1 year ago

Comment from Argus on May 4, 2023:


@Mihai-QuickSilverDev @severinbeauvais Just did a test for this in DEV and verified that the UI is not passing the gazette publish and application mailed date that were filled out in the conversion application.

FE Http Request Body

PUT https://legal-api-dev.apps.silver.devops.gov.bc.ca/api/v2/businesses/BC0871238/filings/144874 Note that values were passed for parties and offices in the body payload but replaced with empty list to help with readability.


{
  "filing": {
    "business": {
      "foundingDate": "2022-11-21T08:04:10.034456+00:00",
      "identifier": "BC0871238",
      "legalName": "0871238 B.C. COMMUNITY CONTRIBUTION COMPANY LTD.",
      "legalType": "CC"
    },
    "header": {
      "certifiedBy": "asdf",
      "date": "2023-05-04",
      "folioNumber": "",
      "name": "restoration",
      "priority": false,
      "waiveFees": true
    },
    "restoration": {
      "approvalType": "registrar",
      "business": {
        "identifier": "BC0871238",
        "legalType": "CC"
      },
      "contactPoint": {
        "email": "snikker298@gmail.com",
        "phone": "(911) 033-7861"
      },
      "nameRequest": {
        "legalName": "0871238 B.C. COMMUNITY CONTRIBUTION COMPANY LTD.",
        "legalType": "CC"
      },
      "offices": [], 
      "parties": [],
      "relationships": [
        "Heir or Legal Representative",
        "Officer"
      ],
      "type": "limitedRestorationToFull"
    }
  }
}
severinbeauvais commented 1 week ago

I may have fixed these issues in #16079.

ArwenQin commented 1 week ago

@severinbeauvais For limited restore by Registrar, then convert to full restore, the approval type section shows both types:

image.png

But if I choose by court order, while there shows no error, after I click "file and pay", it shows error saying "must choose registrar"

image.png

Just to confirm is it a bug, or expected? I assume it's a bug.

ArwenQin commented 1 week ago

@severinbeauvais Just to confirm, Approval Type approved by registrar, can the date the Notice of the Application and date of mailed be in future?

image.png

Currently, both dates can be in the future.

severinbeauvais commented 1 week ago

@severinbeauvais Just to confirm, Approval Type approved by registrar, can the date the Notice of the Application and date of mailed be in future? Currently, both dates can be in the future.

If you don't see a requirement for this in the UI designs then it's OK.

severinbeauvais commented 1 week ago

@severinbeauvais For limited restore by Registrar, then convert to full restore, the approval type section shows both types: But if I choose by court order, while there shows no error, after I click "file and pay", it shows error saying "must choose registrar" Just to confirm is it a bug, or expected? I assume it's a bug.

@Mihai-QuickSilverDev , what is the requirement here -- if the limited restoration was done by registrar (not court order), does the conversion to full restoration have to be done by registrar also, or can the conversion be done by court order?

I think the UI design says that the conversion can be done by court order even if the limited restoration was done by registrar. If this is true then this is a Legal API validation bug (new ticket).

Mihai-QuickSilverDev commented 1 week ago

Hi Sev, the only restriction is this:

So, going back to your question, if a company was limited restored by Registrar, that restoration could be converted to a Full one by Court Order, and vice-versa.

severinbeauvais commented 1 week ago

So, going back to your question, if a company was limited restored by Registrar, that restoration could be converted to a Full one by Court Order, and vice-versa.

According to the UI design, if the limited restoration was done by Court Order then the conversion must also be done by Court Order. Can you confirm this?

However, it seems accurate that, if the limited restoration was done by Registrar then the conversion could be done by Registrar or Court Order. Because of this, I think we need that Legal API validation ticket. Arwen, can you please create it?

ArwenQin commented 1 week ago

Because of this, I think we need that Legal API validation ticket. Arwen, can you please create it?

@severinbeauvais Yes, I just created # 23251

ArwenQin commented 1 week ago

I verified the following:

Full Restore Application:

Limited Restore Application, by court order:

Limited Restore Application, by Registrar:

Limited Restoration Conversion to Full

Test Limited Restoration Extension - verified, no bug View wrapper component - verified, no bug

Will fix the 2 small bugs mentioned above in this ticket:

  1. In the Limited Restoration Application Page, Section 2 Limited Restoration time, when choose " __month" but didn't enter the number, the error didn't show, all fields are green

    image.png

    @severinbeauvais This bug is in create UI, do we fix it here?

  2. Conversion to Full Restoration or Limited Restoration Extension page, when we edited the Applicant Person's information, click "Save and Resume", the "Undo" function doesn't work anymore

    image.png
severinbeauvais commented 1 week ago

Sounds good.

~For the first bug, you'll need to fix the component in the bcrs-shared-components repo. I can help you publish it.~ see next comment

severinbeauvais commented 1 week ago

I am already working on the first bug, in Create UI, in #16700.

Try to fix the second bug in this ticket. Thanks!

ArwenQin commented 1 week ago
  1. The Edit UI bug mentioned above is fixed in this PR: https://github.com/bcgov/business-edit-ui/pull/588
  2. I found another 2 bugs, which I believe are with Legal API issue:
    • For Limited Restoration Extension/Conversion, if we replace the original person/business with a new business, the process fails image.png

File and Pay process fails:

image.png

@severinbeauvais

severinbeauvais commented 1 week ago

@Mihai-QuickSilverDev ~Please look at Arwen's findings above regarding the replacement of the applicant in a Limited Restoration Extension (which was pre-populated from the limited restoration filing). Is it allowed?~ wait, I'm still trying to understand what's going on; no need to answer this

deleted obsolete comment

severinbeauvais commented 1 week ago

SB's analysis

The first bug is a schema validation error. Arwen, you'll have to compare the filing JSON with the appropriate schemas to see what's invalid.

The second bug is a back end error. Arwen will create a new bug ticket for it.

ArwenQin commented 1 week ago

New bug ticket created for the back end error (remove and add person): https://app.zenhub.com/workspaces/entities---olga-65af15f59e89f5043c2911f7/issues/gh/bcgov/entity/23277

ArwenQin commented 4 days ago

@severinbeauvais

severinbeauvais commented 4 days ago
  • For the schema, I found the taxId and identifier are not in the Person schema, while we have it in the filing JSON

@vysakh-menon-aot , do you think we should add optional taxId and identified in the schema?

And the middleName (UI) doesn't match middleInitial (schema), but there is a note:

@vysakh-menon-aot , the UI saves "middleName" instead of "middleInitial". Does the BE convert it? (I think if we convert it in the UI then a lot of other UI code will need to be updated to convert it back and forth on draft resume.)

ArwenQin commented 4 days ago

@vysakh-menon-aot CC: @severinbeauvais
Hi Vysakh, could you please try to reproduce this bug: file a correction to an IA, try to change the directors (add one, edit, or remove one). After file the correction, will you see the incorporator showing in the director's section?

image.png

Please see the unnamed incorporator. It seems impossible, the incorporator shouldn't show in the director's page. This bug may be hard to reproduce. And I was able to delete the incorporator from that section for BC1218838. Could you please check in the database? Thanks.

vysakh-menon-aot commented 4 days ago
  • For the schema, I found the taxId and identifier are not in the Person schema, while we have it in the filing JSON

@vysakh-menon-aot , do you think we should add optional taxId and identifier in the schema?

there is no logic around taxid in party (can keep it in the json without adding to schema). identifier is already part of schema (https://github.com/bcgov/business-schemas/blob/main/src/registry_schemas/schemas/party.json#L34).

And the middleName (UI) doesn't match middleInitial (schema), but there is a note:

@vysakh-menon-aot , the UI saves "middleName" instead of "middleInitial". Does the BE convert it? (I think if we convert it in the UI then a lot of other UI code will need to be updated to convert it back and forth on draft resume.)

Currently we support both middleName and middleInitial in party object (event though only middleInitial in schema) while creating/updating parties (entity-filer), I don't remember if we have a ticket to change this. If we are changing it to middleInitial we need to verifiy if its showing in all scenarios

vysakh-menon-aot commented 4 days ago

@vysakh-menon-aot CC: @severinbeauvais Hi Vysakh, could you please try to reproduce this bug: file a correction to an IA, try to change the directors (add one, edit, or remove one). After file the correction, will you see the incorporator showing in the director's section? image.png Please see the unnamed incorporator. It seems impossible, the incorporator shouldn't show in the director's page. This bug may be hard to reproduce. And I was able to delete the incorporator from that section for BC1218838. Could you please check in the database? Thanks.

I cannot reproduce

ArwenQin commented 4 days ago

@vysakh-menon-aot

I cannot reproduce

Thanks a lot! We are wondering it might be that someone did something weird in the Dev db. Do you think if changing something in the db could lead to this bug, or whether it has to be a logic bug.

vysakh-menon-aot commented 4 days ago

If its a draft filing (which is in json) backend will not modify the data

ArwenQin commented 4 days ago

23343 created for the bug that business name didn't show in the Restoration application/extension output

ArwenQin commented 3 days ago

Test note: Fixed 3 bugs in this ticket:

  1. Conversion to Full Restoration or Limited Restoration Extension page, when we edited the Applicant Person's information, click "Save and Resume", then go back - the "Undo" function doesn't work anymore Fixed this bug by removing the re-assign officer ID.
  2. Fixed the bug that removed and added person are not updated, previously in ticket https://app.zenhub.com/workspaces/entities---olga-65af15f59e89f5043c2911f7/issues/gh/bcgov/entity/23277 (verified ticket 23277)
  3. Fixed the bug when the person is a business/corporation, the file and pay fails (fixed the party schema)
severinbeauvais commented 3 days ago

I cannot reproduce

@vysakh-menon-aot Can you think of any db or logic situation that could have caused this? Both Arwen and I saw the Incorporator (albeit with no name) in the director list in a correction.

severinbeauvais commented 3 days ago

As for the incorporator displaying in the list of directors, see ticket #23395.