Altinn / Altinn/app-frontend-react
Prefill of foreign business address does not include postal city
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 33
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
## Describe the bug
## To Reproduce
Steps to reproduce the behavior:
We have the following prefill json
```
{
"$schema": "https://altinncdn.no/schemas/json/prefill/prefill.schema.v1.json",
"allowOverwrite": true,
"ER": {
"OrgNumber": "Virksomhet.Organisasjonsnummer",
"Name": "Virksomhet.Navn",
"UnitType": "Virksomhet.Organisasjonsform",
"BusinessAddress": "Virksomhet.Adresse.Gateadresse",
"BusinessPostalCode": "Virksomhet.Adresse.Postnr",
"BusinessPostalCity": "Virksomhet.Adresse.Poststed"
},
"DSF": {
},
"UserProfile": {
}
}
```
When opening a company with a foreign business address with no postal code, but still a postal city in brreg, it does not include the postal city as I would expect when prefilling.
## Expected behavior
Prefill should include postal city
## Screenshots
> If applicable, add screenshots or animated gif to help explain your problem.
## Additional info
> Add any other relevant context info about the problem here.
> For example OS (Windows, MacOS, iOS), browser (Chrome, Firefox, Safari), device (iPhone, laptop), screen-size, etc.
App: dat/innkvartering
Contributor guide
Research direction
Start by tracing the prefill handling for ER.BusinessPostalCity and reproduce the issue with the provided JSON using a foreign business address that has a postal city but no postal code. Done means the postal city is included when the form is opened, even when the postal code is absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100