Skip to content

Support objects in expressions#1777

Open
TomasEng wants to merge 1 commit into
support-lists-in-expressionsfrom
support-objects-in-expressions
Open

Support objects in expressions#1777
TomasEng wants to merge 1 commit into
support-lists-in-expressionsfrom
support-objects-in-expressions

Conversation

@TomasEng
Copy link
Copy Markdown
Contributor

@TomasEng TomasEng commented May 28, 2026

Important

This pull request is stacked upon #1769, which should be merged first.

Description

This pull request adds support for objects in expressions, along with an object function for creating an object. Here is an overview of the changes:

  • New object function in ExpressionEvaluator. Because of the complexity of the function, I created a separate class named ObjectFunctionEvaluator for evaluating the function.
  • Support for dictionaries in ExpressionValue. Most of the code did already exist, hiding in comments.

Here is the corresponding change in App frontend: Altinn/altinn-studio#18982

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing not possible since there is no use case for this until we add functions that accept objects as parameters; the automated unit tests should be sufficient
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 34aa6295-62f8-4316-b1d8-65cc22ede63d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch support-objects-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 TomasEng added feature Label Pull requests with new features. Used when generation releasenotes backport-ignore This PR is a new feature and should not be cherry-picked onto release branches labels May 28, 2026
@TomasEng TomasEng force-pushed the support-objects-in-expressions branch from 5a4dacc to 5c9c571 Compare May 28, 2026 13:12
@TomasEng TomasEng added the squad/data Issues that belongs to the named squad. label May 29, 2026
@TomasEng TomasEng moved this to 👷 In progress in Team Altinn Studio May 29, 2026
@TomasEng TomasEng force-pushed the support-objects-in-expressions branch from 2fb14e2 to ee69ba5 Compare May 29, 2026 07:00
Comment on lines +233 to +235
#pragma warning disable CA1720
@object,
#pragma warning restore CA1720
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sonar complained about this variable having a name that contains "object", but we need this for the object function to work.

@TomasEng TomasEng force-pushed the support-objects-in-expressions branch 2 times, most recently from 4908de3 to 2a553d2 Compare May 29, 2026 07:33
@TomasEng TomasEng force-pushed the support-objects-in-expressions branch from 2a553d2 to ab5d0b1 Compare May 29, 2026 07:40
@sonarqubecloud
Copy link
Copy Markdown

@TomasEng
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 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.

@TomasEng TomasEng marked this pull request as ready for review May 29, 2026 08:02
@TomasEng TomasEng moved this from 👷 In progress to 🔎 In review in Team Altinn Studio May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-ignore This PR is a new feature and should not be cherry-picked onto release branches feature Label Pull requests with new features. Used when generation releasenotes squad/data Issues that belongs to the named squad.

Projects

Status: 🔎 In review

Development

Successfully merging this pull request may close these issues.

1 participant