Skip to content

Added documentation and examples for prefill from DAN#2631

Open
pernillehofgaard wants to merge 3 commits intoAltinn:masterfrom
pernillehofgaard:feature/add-danprefill-info
Open

Added documentation and examples for prefill from DAN#2631
pernillehofgaard wants to merge 3 commits intoAltinn:masterfrom
pernillehofgaard:feature/add-danprefill-info

Conversation

@pernillehofgaard
Copy link

@pernillehofgaard pernillehofgaard commented Jan 20, 2026

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

  • Documentation
    • Added DAN (data.altinn.no) as a new prefill data source for form configuration
    • Updated guides to describe DAN alongside existing sources (ER, DSF, UserProfile)
    • Added examples showing single- and multi-dataset DAN mappings and how to map multiple DAN datasets to form fields

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

Caution

Review failed

The head commit changed during the review from c169607 to b5b66c9.

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'auto_resolve_threads'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
📝 Walkthrough

Walkthrough

Adds DAN (Datasett fra data.altinn.no) as a new prefill data source to the prefill configuration guides. English and Norwegian Bokmål pages are updated with the new top-level "DAN": {} config, explanatory text, and examples showing single- and multi-dataset mappings. Norwegian Nynorsk content was not modified.

Changes

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. "Dan" should be "DAN" for consistency with the source identifier.
  2. 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@pernillehofgaard pernillehofgaard force-pushed the feature/add-danprefill-info branch from c169607 to b5b66c9 Compare January 26, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant