Altinn / Altinn/app-lib-dotnet
PostSimplified prefill does not support lists
- Dominant language
- C#
- Stars
- 8
- Forks
- 27
- Avg merge
- 1h 21m
- Merged PRs (30d)
- 7
Description
### Description of the bug
When instantiating with prefill, the prefill ignores lists.

Looking into the code, it looks like the prefill have no list support implemented?
https://github.com/Altinn/app-lib-dotnet/blob/1be1b79ce004aaa27a8cd12fcfdba2bf6e839442/src/Altinn.App.Core/Implementation/PrefillSI.cs#L161
If this get fixed, it would be nice to also implement support for nested objects, instead of the current flat structure.
### Steps To Reproduce
Call PostSimplified (https://{org}.apps.altinn.no/{org}/{app}/instances/create) with prefill that contains a list that should be deserialized into a corresponding List class.
### Additional Information
_No response_
Contributor guide
Research direction
Start with the PrefillSI.cs code around line 161 and reproduce the issue through the PostSimplified instances/create endpoint using prefill containing a list. Trace how the prefill is deserialized, then verify that list values are populated in the corresponding model and consider the requested nested-object support; done means these cases are covered and tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100