bcgov / entity

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

URGENT HOTFIX - PENDING_PAYMENT STATUS INCORRECT - Submitting intentional duplicate names blocked #18515

Closed ozamani9gh closed 11 months ago

ozamani9gh commented 1 year ago

Describe the bug in current situation Submitting intentional duplicate names blocked

Link bug to the User Story https://app.zenhub.com/workspaces/ops-60f8556e05d25b0011468870/issues/gh/bcgov-registries/ops-support/3256

Impact of this bug HIGH PRIORITY - users are not able to submit same name if failure occurs in creating DRAFT NR.

Chance of Occurring (high/medium/low/very low) HIGH

Steps to Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Actual/ observed behavior/ results

Clients are reporting that when they attempt to submit intentional duplicate Sole Proprietorship name requests, the system is blocking them. (Clients should have the ability to submit duplicate name requests for things like multiple DBAs under various corporations etc.). Staff are currently advising clients to submit as any other type, and then manually changing the type afterwards for the client. This is resulting unnecessary calls and time taken for staff to help resolve. Screenshot of system message when client attempted to submit an intentional duplicate Sole Proprietorship name:

Expected behavior Duplicate names should be allowed if first attempt failed to process NR.

Screenshots/ Visual Reference/ Source Private Zenhub Image

eve-git commented 1 year ago

I think it is the condition (Request.stateCd == 'PENDING_PAYMENT') causing the issue. According to the OPS ticket, most of the duplicate NRs were requested within 5 minutes. How about to add one more condition at https://github.com/bcgov/namex/blob/main/api/namex/models/request.py#L338 as

  1. the existing request submitted time is within 5 minutes and Request_stateCd == 'PENDING_PAYMENT' or
  2. request_stateCd == 'DRAFT'
Rajandeep98 commented 1 year ago

https://github.com/bcgov/namex/pull/1484

Rajandeep98 commented 1 year ago

To Test: create a request assumptions: email is same as previous request and name is same as previous request 1: scenario submission time > 5 mins : (request considered as intentional duplicate) create an another request after 5 minutes to send the same name again. system should not block this request

  1. scenario submission time < 5 mins: (request considered as accidental duplicate): create another request within 5 minutes to send the same name: system should block only this one.
ozamani9gh commented 12 months ago

@Rajandeep98 @oanyahuru built in DEV. once Rajan has verified changes in dev, i will build in test and Oge can test changes

ozamani9gh commented 12 months ago

@oanyahuru its in test now, please test and let us know when its ready for Release

ozamani9gh commented 12 months ago

i received new information from joshua, we need to make a couple of changes to this ticket before Oge tests it.

Private Zenhub Image

Rajandeep98 commented 11 months ago

FE CR: https://github.com/bcgov/namerequest/pull/747 Private Zenhub Image

oanyahuru commented 11 months ago

I tested and it works as expected. A duplicate for a DBA created within 2 mins of another with the same name generates an error/warning page. If generated after 2 minutes, the process proceeds to payment and the duplicate NR is created.