Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MHR - API validation for the location data #15933

Closed
1 task done
chdivyareddy opened this issue Apr 11, 2023 · 5 comments
Closed
1 task done

MHR - API validation for the location data #15933

chdivyareddy opened this issue Apr 11, 2023 · 5 comments
Assignees
Labels

Comments

@chdivyareddy
Copy link
Collaborator

chdivyareddy commented Apr 11, 2023

  • When filing the MHR through API, if the location data with the Dealer Name, Park Name, and Other land location types (Indian Reserve/Strata/Other), then the API accepts and files the registration. But, this is how it looks in the outputs (Dealer/Manufacturer and the Legal Land Description for PID: 011625490 both are displayed in the outputs).

Developer Note - validation rules by API location type from attached document
MANUFACTURER
Required: dealerName
Allowed: additionalDescription
MH_PARK
Required: parkName, pad
Allowed: additionalDescription
RESERVE
Required: bandName, reserveNumber
Allowed: additionalDescription, pidNumber, legalDescription, all LTSA detail fields {lot, parcel, block,...}
STRATA
Required: pidNumber or manual legal description: {lot, landDistrict, plan}
Allowed: additionalDescription, legalDescription, other LTSA detail fields
OTHER
Required: pidNumber or manual legal description: either {lot, landDistrict, plan} or {landDistrict, districtLot}
Allowed: additionalDescription, legalDescription, other LTSA detail fields

Eg of MHR number: 150102 in TEST

image.png

https://app.zenhub.com/files/157936592/11e4e87b-1ea9-42eb-bb5c-f6129d529858/download

Payload:

"location": {
    "locationType": "OTHER",
    "parkName": "HIDDEN VALLEY TRAILER COURT",
    "pad": "20",
    "address": {
      "street": "940 BLANSHARD STREET",
      "city": "VICTORIA",
      "region": "BC",
      "country": "CA",
      "postalCode": "A1A 1A1"
    },
    "leaveProvince": false,
    "pidNumber": "011625490",
    "taxCertificate": false,
    "dealerName": "NOR-TEC DESIGN GROUP LTD.",
    "additionalDescription": "SPALLUMCHEEN INDIAN RESERVE NO. 2",
    "legalDescription": "LOT 3 PARCEL A (69860M) OF THE NORTH WEST 1/4 OF SECTION 34 TOWNSHIP 78 RANGE 16 WEST OF THE 6TH MERIDIAN PEACE RIVER DISTRICT",
    "lot": "3",
    "parcel": "A (69860M)",
    "block": "",
    "districtLot": "",
    "partOf": "",
    "section": "34",
    "township": "78",
    "range": "16",
    "meridian": "",
    "landDistrict": "PEACE RIVER",
    "plan": ""
  },

Note: Only one location type is accepted through the UI for the filing

image.png

@mstanton1
Copy link
Collaborator

Front end restricts this scenario from happening. To look at similar corresponding validation on the UI.

@mstanton1
Copy link
Collaborator

@mstanton1 to attach rules on what different combinations of data are allowed.

@mstanton1 mstanton1 self-assigned this Apr 19, 2023
@mstanton1
Copy link
Collaborator

@doug-lovett I couldn't find the document I was thinking of so created the summary below. Please let me know if additional info is needed. Thanks!

https://app.zenhub.com/files/157936592/0392b963-5781-41f9-a99b-9c369466cf41/download

@doug-lovett
Copy link
Collaborator

@mstanton1 Thank you.

@chdivyareddy
Copy link
Collaborator Author

Verified in DEV using Postman!

  • When the Location Type is OTHER or MH_PARK and all the other details are included like 'Dealer/manufacturer name, Park name, PID', then the validation on the API is implemented to stop filing the registration:
    image.png

image.png

  • When the Location Type is 'MH_PARK' and only the Park name and Pad details are entered: MHR number - 150527
    image.png

https://app.zenhub.com/files/157936592/9a0ff351-10d6-4589-bc41-085abb6b8463/download

  • When the Location Type is 'OTHER' without PID and the required fields/details are entered: MHR Number - 150530

image.png

https://app.zenhub.com/files/157936592/3ff78039-9873-4527-890a-6a2e493b0e3c/download

@PCC199 PCC199 closed this as completed Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants