Skip to content

Create UI - min start date check is not working (was: Re-enact previous error message) #30497

Open

Description

@Mihai-QuickSilverDev

Environment - Prod
User class - End User

  • When trying to complete a firm registration (as a regular user) and I enter a Start Date older than 10 years, I receive this generic error:

image.png

To Do List:

  • Replace generic error message with a clear error.
  • UI/UX to retrieve previous error message from repository and provide here.
  • Error message should read something like this:
  • " Start Date cannot be older than 10 years from today's date. Please adjust this date and try again."

Activity

  1. added
    Entities Team
    bug
    on Sep 2, 2025
  2. added
    UX
    on Sep 2, 2025
  3. changed the title [-]Create UI - Re-enact error message for firm's registration[/-] [+]Create UI - Re-enact previous error message for firm's registration[/+] on Sep 2, 2025
  4. severinbeauvais commented on Sep 3, 2025

    @severinbeauvais
    Collaborator

    deleted obsolete comment

  5. severinbeauvais commented on Sep 3, 2025

    @severinbeauvais
    Collaborator

    deleted obsolete comment

  6. severinbeauvais commented on Sep 5, 2025

    @severinbeauvais
    Collaborator

    This was reported by an end user, and the UI should have prevented them from entering a start date older than 10 years. This was originally implemented but seems to be broken, and should be fixed.

    The reported issue is related to the error message, but actually it's fine -- the UI failed to catch the error (and so did not display an error) but the API caught it.

  7. severinbeauvais commented on Oct 7, 2025

    @severinbeauvais
    Collaborator

    Note that a staff user has a special permission to bypass the "min start date" check. Please verify that this still works (UI + API -- full filing test).

  8. changed the title [-]Create UI - Re-enact previous error message for firm's registration[/-] [+]Create UI - min start date check is not working (was: Re-enact previous error message)[/+] on Oct 7, 2025
  9. bobdev-94 commented on Oct 7, 2025

    @bobdev-94

    I tested it with regular user.
    It's disabled so user cannot select start date older than 10 years old.
    Screenshot 2025-10-07 at 9.55.14 AM.png

  10. severinbeauvais commented on Oct 7, 2025

    @severinbeauvais
    Collaborator

    Please follow up with this ticket's author to see how this may have been done as described.

    Also, please verify that you can file a Registration, as staff, with a start date older than 10 years. I want to check that the API does not block it.

    Thank you.

  11. bobdev-94 commented on Oct 8, 2025

    @bobdev-94
    1. I checked the legal-api. There are a validation code to ignore the start date is older than 10 years if user is the staff role.
      https://github.com/bcgov/lear/blob/e01756d9dff72c2963f11f567e41b91f38e7f09c/legal-api/src/legal_api/services/filings/validations/registration.py#L138-L141
    2. And, I tested on the dev env with staff role, add entered the start date older than 10 years, it worked well.
      https://dev.business-dashboard.bcregistry.gov.bc.ca/FM1169767?filing_id=206568&accountid=3040
      You can download the document and check the start date - August 24, 2005

    Screenshot 2025-10-08 at 8.52.04 AM.png

  12. severinbeauvais commented on Oct 8, 2025

    @severinbeauvais
    Collaborator

    Bobby, thank you for testing and verifying that the expected code is in place.

    @Mihai-QuickSilverDev , our analysis is complete and we have not been able to reproduce this, nor do we see how the code might allow it. Can we walk through your scenario with you some time to see if we're missing something? Thanks!

  13. Mihai-QuickSilverDev commented on Oct 8, 2025

    @Mihai-QuickSilverDev
    CollaboratorAuthor
    • Tested in Test - successful.
    • Tested in Prod - successful.
    • We know this was an issue, as Vysakh has retrieved an error in Prod which was showing a start date older than 10 years.
    • Somehow this is fixed now.
    • When entering the business start date, the user is forced to use a calendar selection.
    • That calendar selection works as intended, only going back in time a maximum of 10 years.
      @OlgaPotiagalova This ticket can be closed.

    NOTE:

    • We might have to check at some time if the API users have the same validation in place.
    • It is also possible that user might have been working with Staff at a BC Service Centre, and Staff can go beyond 10 years.
  14. Mihai-QuickSilverDev commented on Oct 8, 2025

    @Mihai-QuickSilverDev
    CollaboratorAuthor
    • My last note above actually gave me the idea on how this error happens.
      Error Scenario:
    1. End user starts SP registration
    2. End user saves draft
    3. End user goes to Service BC Center
    4. Staff accesses the draft and enter a business start date older than 10 years
    5. End user resume the draft and complete the registration
    6. End user receives older than 10 years error.

    To Do List:

    1. Because only Staff can put that date to older than 10 years
    2. Allow the registration to get through when the Business Start Date is older than 10 years. Requires BE ticket.

    NOTE:

    1. API users can only function as end users.
    2. The work on this ticket should not unilaterally be affected by API questions.
    3. There is an API access roles and privileges epic for that work and questions.
  15. severinbeauvais commented on Oct 8, 2025

    @severinbeauvais
    Collaborator

    Mihai bypassed the start date validation in the UI by having staff update the draft. Since it was the user who finally submitted the filing, the API used the user's permissions and did not allow the start date older than 10 years.

    I believe Mihai's request is to allow a start date older than 10 years when that change was done by staff but the filing is submitted by a regular user.

    I can't think of a way to quickly do this that wouldn't be easily spoofable by an API user. (Note that we do not know whether the submission is from an API user or a regular user. They are currently undistinguishable.)

    If we come up with a technical solution then I recommend creating a new ticket (possibly with sub-issues). We should also consider whether any other validations should be bypassed when the data is entered by staff.

    @argush3 @vysakh-menon-aot Any ideas on how to solve this?

  16. severinbeauvais commented on Oct 8, 2025

    @severinbeauvais
    Collaborator

    @argush3 , Mihai tells me that the API should always allow a start date older than 10 years in a registration filing. (It's validated in Create UI.)

    MD: Yes, as mentioned in our direct communication: We are asking for us to know unequivocally that if the Business Start Date is older than 10 years, that was done by Staff. Simply, because no other user has that right. If they do, that's a bug that needs to be fixed on its own.

    Mihai said I should ask you: Isn't there a concern that an API user could set a start date older than 10 years, when they shouldn't be allowed to?

    MD: - this is not what I asked. What I said is, if you have any concerns of API users being able to move a firm's Business Start Date beyond 10 years themselves, that's something you need to discuss with the API experts, in this case Argus.

  17. Mihai-QuickSilverDev commented on Oct 8, 2025

    @Mihai-QuickSilverDev
    CollaboratorAuthor
  18. severinbeauvais commented on Oct 8, 2025

    @severinbeauvais
    Collaborator

    Looks like @severinbeauvais is already working on a fix for this situation here: https://app.zenhub.com/workspaces/entities---olga-65af15f59e89f5043c2911f7/issues/gh/bcgov/entity/30993

    What a coincidence! That ticket asks for the role check to be replaced with a permissions check. However, either check will prevent a user-submitted registration with a business start date older than 10 years.

  19. severinbeauvais commented on Oct 8, 2025

    @severinbeauvais
    Collaborator

    SB wrote:

    Mihai bypassed the start date validation in the UI by having staff update the draft. Since it was the user who finally submitted the filing, the API used the user's permissions and did not allow the start date older than 10 years.

    To me, this seems like circumventing the checks we put in the UI. Is this a valid scenario that we want to support?

    Options:

    • ask staff to submit a registration with validation overrides (ie, that would block a user), or
    • leave the validation only in the UI, and remove it from the API (but this might let API users enter invalid data), or
    • come up with a design to allow staff to override some values but the user will submit the filing

    cc: @OlgaPotiagalova

  20. added and removed
    UX
    on Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Entities TeamPriority2UX Assurancebug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions