Skip to content

docs: Add ADR for mapping and filtering in expressions#18768

Open
TomasEng wants to merge 4 commits into
mainfrom
adr-for-map-and-filter-in-expressions
Open

docs: Add ADR for mapping and filtering in expressions#18768
TomasEng wants to merge 4 commits into
mainfrom
adr-for-map-and-filter-in-expressions

Conversation

@TomasEng
Copy link
Copy Markdown
Contributor

@TomasEng TomasEng commented May 12, 2026

Description

This pull request adds an ADR (Architecture Decision Record) that summarises our discussion on mapping and filtering in expressions.

Verification

  • No related issues
  • Your code builds clean without any errors or warnings
  • Manual testing done (required) (tested viewing the document in a Markdown editor)
  • Automated testing not relevant; this plull request contains documentation only

Summary by CodeRabbit

Release Notes

  • Documentation
    • Added an architectural decision record documenting adoption of mapping and filtering in expressions via the JMESPath standard.
    • Includes decision context, evaluated alternatives with example syntaxes, pros/cons analysis, decision matrix, outcome, and follow-up actions.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e41dbc39-1ddd-43ea-b07a-1d15898413c6

📥 Commits

Reviewing files that changed from the base of the PR and between 73b7748 and 6f73c71.

📒 Files selected for processing (1)
  • docs/adr/2026-05-11-maps-and-filters-in-expressions.md

📝 Walkthrough

Walkthrough

This PR adds an ADR that records choosing JMESPath (alternative A6) to enable mapping and filtering in Altinn Studio expressions, describes the problem and twelve decision drivers, documents seven alternatives with examples, evaluates pros/cons, and includes a decision matrix.

Changes

Maps and Filters in Expressions ADR

Layer / File(s) Summary
ADR metadata, decision and drivers
docs/adr/2026-05-11-maps-and-filters-in-expressions.md
Adds ADR title, status, deciders, date, states the chosen result (JMESPath/A6) and initial implementation approach; defines the problem context and lists decision drivers B1–B12.
Alternatives, evaluation and decision matrix
docs/adr/2026-05-11-maps-and-filters-in-expressions.md
Documents seven alternatives (A1–A7) with inline and function-style examples for mapping/filtering, provides structured pros/cons for each alternative against drivers, and adds a decision matrix showing JMESPath as the accepted choice.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested labels

approve

Poem

I hopped through choices, seven wide,
JMESPath chosen, clear my stride,
Maps and filters, lists set free,
The ADR sings—now let it be! 🐇

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding an ADR document about mapping and filtering in expressions.
Description check ✅ Passed The description covers all required sections from the template with sufficient detail and verification checklist items completed.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch adr-for-map-and-filter-in-expressions

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.

@TomasEng
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
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.

🧹 Nitpick comments (2)
docs/adr/2026-05-11-maps-and-filters-in-expressions.md (2)

25-26: 💤 Low value

Optional: Consider adding a comma for clarity.

The phrase "that is to say not considering memory limits" could be slightly clearer with a comma after "say".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/adr/2026-05-11-maps-and-filters-in-expressions.md` around lines 25 - 26,
Edit the sentence in the ADR so the parenthetical phrase reads "that is to say,
not considering memory limits" — i.e., insert a comma after "say" in the phrase
"that is to say not considering memory limits" (look for the line containing
"**B3:** It should theoretically (that is to say not considering memory limits)
support...") to improve clarity.

30-32: 💤 Low value

Optional: Consider simplifying the intensifier.

The phrase "a very good chance" could be simplified to "a strong likelihood" or similar phrasing for more direct technical writing.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/adr/2026-05-11-maps-and-filters-in-expressions.md` around lines 30 - 32,
Update the wording for bullet "B7" in the ADR (the line that currently reads
"This might be considered 'nice to have' since there is a very good chance we
will need lambda functions at some point anyway.") to use a more direct
intensifier such as "a strong likelihood" (e.g., replace "a very good chance"
with "a strong likelihood" or similar concise phrasing) so the sentence reads
more technically direct while preserving the original meaning.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/adr/2026-05-11-maps-and-filters-in-expressions.md`:
- Around line 25-26: Edit the sentence in the ADR so the parenthetical phrase
reads "that is to say, not considering memory limits" — i.e., insert a comma
after "say" in the phrase "that is to say not considering memory limits" (look
for the line containing "**B3:** It should theoretically (that is to say not
considering memory limits) support...") to improve clarity.
- Around line 30-32: Update the wording for bullet "B7" in the ADR (the line
that currently reads "This might be considered 'nice to have' since there is a
very good chance we will need lambda functions at some point anyway.") to use a
more direct intensifier such as "a strong likelihood" (e.g., replace "a very
good chance" with "a strong likelihood" or similar concise phrasing) so the
sentence reads more technically direct while preserving the original meaning.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0ff20107-d980-4d00-9716-0e2abe0eddbc

📥 Commits

Reviewing files that changed from the base of the PR and between c56a34e and 73b7748.

📒 Files selected for processing (1)
  • docs/adr/2026-05-11-maps-and-filters-in-expressions.md

@TomasEng TomasEng marked this pull request as ready for review May 12, 2026 10:29
@TomasEng TomasEng moved this to 🔎 In review in Team Altinn Studio May 12, 2026
@TomasEng TomasEng added kind/documentation Issues related to documentation. squad/data Issues that belongs to the named squad. labels May 12, 2026
@TomasEng TomasEng requested review from ivarne and olavsorl May 12, 2026 10:30
Copy link
Copy Markdown
Contributor

@olavsorl olavsorl left a comment

Choose a reason for hiding this comment

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

LGTM! Nice work! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/documentation Issues related to documentation. squad/data Issues that belongs to the named squad.

Projects

Status: 🔎 In review

Development

Successfully merging this pull request may close these issues.

2 participants