bcgov / bcgov/entity

Provincial/State field is required at backend but is optional at frontend.

Open
#17,470 0 comments 0 reactions 0 assignees View on GitHub
bug Pay
Dominant language
JavaScript
Stars
23
Forks
62
Avg merge
24m
Merged PRs (30d)
1

Description

**Describe the bug in current situation**
Please reference to ops ticket https://github.com/bcgov-registries/ops-support/issues/3005
User got failed message when create account, the auth API schema require at least one letter for province/state field.
[Private Zenhub Image](https://api.zenhub.com/attachedFiles/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBc0FwIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--98827f56b5746e0e1fde7f3e2e1d3b1cbca7d8cd/image.png)

UI shows it's optional, so user may not input anything, which cause account creation failure.
[Private Zenhub Image](https://api.zenhub.com/attachedFiles/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBc1lwIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--8bbadcb01072d1f8b8dfd1b70bc6c3beab373055/image.png)

Also the state/province field has limit the input to two letters, which might not suitable for other countries.

**Link bug to the User Story**

**Impact of this bug**
User can not create account.

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

**Pre Conditions: which Env, any pre-requesites or assumptions to execute steps?**
Dev or test site.
**Steps to Reproduce**
Steps to reproduce the behavior:
1. Go to 'create account', and follow the account creation flow.
2. On step 3 "account information" page, input address without input anything in "Provincial/State" field.
3. Follow Account creation flow and see the error at the last step.

**Actual/ observed behavior/ results**
Account creation failed.

**Expected behavior**
Account should be created.

**Screenshots/ Visual Reference/ Source**
[Private Zenhub Image](https://api.zenhub.com/attachedFiles/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdGdwIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--5c6629b7c4e2365047df23da825fab4acd118549/image.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the create-account flow and the auth API schema described in the issue, then compare the frontend's optional and two-letter Provincial/State validation with the backend requirement. Reproduce the failure on a dev or test site and verify that account creation succeeds for an omitted field while international state or province values are accepted consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, javascript, python
Domain
api, authentication, backend, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.