Added documentation and examples for prefill from DAN#2631
Added documentation and examples for prefill from DAN#2631pernillehofgaard wants to merge 3 commits intoAltinn:masterfrom
Conversation
|
Note
|
| Cohort / File(s) | Summary |
|---|---|
DAN Prefill Data Source Documentation content/altinn-studio/v8/guides/development/prefill/config/_index.en.md, content/altinn-studio/v8/guides/development/prefill/config/_index.nb.md |
Adds DAN as a fourth prefill source (ER, DSF, UserProfile, DAN). Inserts top-level "DAN": {} into example JSON, updates descriptive text to list DAN, and adds examples for single-dataset (UnitBasicInformation → Organization.OrgNo) and multi-dataset mappings plus extended UserProfile examples showing DAN usage. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
🎉 A new DAN dataset drifts in the stream,
Fields align and mappings gleam,
Examples show single and many,
Docs updated — neat and zany,
Prefill sings in code and dream.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately describes the main change: adding documentation and examples for DAN prefill functionality, which aligns with the file modifications in both English and Norwegian documentation files. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
content/altinn-studio/v8/guides/development/prefill/config/_index.nb.md (1)
52-52: Critical: Update count from three to four groups.The text still says "De tre gruppene" (The three groups), but with the addition of DAN, there are now four prefill sources. This is inconsistent with the English version which correctly states "four groups" on line 52.
🐛 Proposed fix
- De tre gruppene i koden speiler de tre kildene som er tilgjengelige: + De fire gruppene i koden speiler de fire kildene som er tilgjengelige:
🤖 Fix all issues with AI agents
In `@content/altinn-studio/v8/guides/development/prefill/config/_index.en.md`:
- Line 46: The JSON entry for the locale is missing a space after the colon;
locate the string literal "DAN":{} in the markdown (in the JSON block) and
change it to "DAN": {} so formatting matches the other entries and preserves
consistent spacing.
- Line 56: The list item "- `DAN`- Datasets from data.altinn.no" is missing a
space after the hyphen; update the markdown list entry in _index.en.md so the
item matches the other entries by inserting a space after the hyphen (i.e.,
change the "- `DAN`- ..." token to "- `DAN` - ...") to ensure consistent
formatting.
- Around line 107-121: Update the example JSON: change the text "from dan" to
"from DAN" for consistent capitalization of the source identifier, and remove
the trailing comma in the mappings array so the JSON for the "DAN" object
(datasets -> name "UnitBasicInformation" -> mappings with {
"OrganizationNumber": "Organization.OrgNo" }) is valid JSON.
In `@content/altinn-studio/v8/guides/development/prefill/config/_index.nb.md`:
- Line 46: The JSON entry for the language key "DAN":{} is missing a space after
the colon; update that specific token to "DAN": {} so it matches the formatting
of the other entries (add a single space after the colon in the "DAN" key).
- Around line 107-121: Change the lowercase "dan" to uppercase "DAN" in the
explanatory text to match the source identifier and remove the trailing comma
inside the "mappings" array so the JSON example is valid; specifically update
the description referencing "DAN" and fix the "DAN" example block where the
"mappings" array contains { "OrganizationNumber": "Organization.OrgNo" } with no
trailing comma.
- Line 123: The sentence "Dan kan bruke flere datasett samtidig. Hvis du vil
bruke flere datasett, kan du gjøre dette slik." uses the wrong capitalization
for the source identifier; update the first word "Dan" to "DAN" so it reads "DAN
kan bruke flere datasett samtidig..." to match the identifier usage elsewhere in
the docs (locate the sentence containing "Dan kan bruke flere datasett samtidig"
and replace "Dan" with "DAN").
🧹 Nitpick comments (1)
content/altinn-studio/v8/guides/development/prefill/config/_index.en.md (1)
122-122: Improve style and capitalization.Two improvements:
- "Dan" should be "DAN" for consistency with the source identifier.
- Consider the more concise "can retrieve" instead of "is able to retrieve".
✨ Proposed improvement
-Dan is able to retrieve more than one dataset. If you want to use more than one dataset you can add it to the json. +DAN can retrieve more than one dataset. If you want to use more than one dataset you can add it to the JSON.Note: Also capitalized "JSON" for consistency.
content/altinn-studio/v8/guides/development/prefill/config/_index.en.md
Outdated
Show resolved
Hide resolved
content/altinn-studio/v8/guides/development/prefill/config/_index.en.md
Outdated
Show resolved
Hide resolved
content/altinn-studio/v8/guides/development/prefill/config/_index.nb.md
Outdated
Show resolved
Hide resolved
content/altinn-studio/v8/guides/development/prefill/config/_index.nb.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@content/altinn-studio/v8/guides/development/prefill/config/_index.en.md`:
- Around line 107-109: Rewrite the sentence to include "the" and improve flow:
change the line to read something like "This will fill the `Organization.OrgNo`
field with the organization number from the UnitBasicInformation dataset in
Data.altinn.no (DAN)." Update the text referencing `Organization.OrgNo` and
`UnitBasicInformation` accordingly for clarity.
- Around line 52-56: Create the missing Norwegian Nynorsk guide by adding
content/altinn-studio/v8/guides/development/prefill/config/_index.nn.md that is
a translation/parity copy of the English and Bokmål files: include the same
frontmatter/metadata, the four-source list (`ER`, `DSF`, `UserProfile`, `DAN`)
translated into Nynorsk, preserve code blocks, links, and any DAN dataset text,
and ensure titles, headings and other UI strings follow the nn-NO variant
conventions so the guide matches en-US and nb-NO content and structure.
🧹 Nitpick comments (1)
content/altinn-studio/v8/guides/development/prefill/config/_index.en.md (1)
122-123: Use consistent capitalization and a tighter verb.“DAN” and “JSON” should be uppercase, and “can” reads cleaner than “is able to.”
📝 Suggested edit
-Dan is able to retrieve more than one dataset. If you want to use more than one dataset you can add it to the json. +DAN can retrieve more than one dataset. If you want to use more than one dataset, you can add it to the JSON.
c169607 to
b5b66c9
Compare
Prefill from data.altinn.no has been added to Prefill. I have updated the documentation and examples to show how this is done.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.