Skip to content

Add first value when changing codelist for mandvar#773

Merged
SjurSutterudSagen merged 1 commit intomainfrom
feature/PxWeb2-740-choose-default-value-when-changing-codelist-mand-var
Aug 15, 2025
Merged

Add first value when changing codelist for mandvar#773
SjurSutterudSagen merged 1 commit intomainfrom
feature/PxWeb2-740-choose-default-value-when-changing-codelist-mand-var

Conversation

@SjurSutterudSagen
Copy link
Contributor

This adds the logic for adding default values, when changing codelists for mandatory variables. The values chosen is limited to the first value, but the code should be easily extendable to be expanded later. This is why I chose to have the logic for adding the defaults seperated from adding codelist to variables. Any extra processing should not have a significant impact, since we are only mapping over variables here, and not values.

Also updated the tests.

This adds the logic for adding default values, when changing codelists
for mandatory variables. The values chosen is limited to the first
value, but the code should be easily extendable to be expanded later.
This is why I chose to have the logic for adding the defaults seperated
from adding codelist to variables. Any extra processing should not have
a significant impact, since we are only mapping over variables here, and
not values.

Also updated the tests.
@github-actions
Copy link

Branch Deployment to Cloudflare Pages

🚛 Preview URL: https://04e7dc86.pxweb2.pages.dev
🚧 Branch preview URL: https://feature-pxweb2-740-choose-de.pxweb2.pages.dev

@sonarqubecloud
Copy link

@SjurSutterudSagen SjurSutterudSagen marked this pull request as ready for review July 11, 2025 08:46
@SjurSutterudSagen SjurSutterudSagen marked this pull request as draft July 11, 2025 08:47
@SjurSutterudSagen SjurSutterudSagen marked this pull request as ready for review August 15, 2025 07:39
Copy link
Contributor

@PerIngeVaaje PerIngeVaaje left a comment

Choose a reason for hiding this comment

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

OK

@SjurSutterudSagen SjurSutterudSagen merged commit 7af82b2 into main Aug 15, 2025
14 checks passed
@SjurSutterudSagen SjurSutterudSagen deleted the feature/PxWeb2-740-choose-default-value-when-changing-codelist-mand-var branch August 15, 2025 08:50
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.

2 participants