Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for saving codelist queryparameters in datamodel #1562

Merged
merged 12 commits into from
Nov 14, 2023

Conversation

Magnusrm
Copy link
Contributor

@Magnusrm Magnusrm commented Oct 11, 2023

Description

Allow for storing the metadata from retrieved code-lists in a specific field in the datamodel by introducing the metadata keyword to be used in dataModelBindings for components that use options.
The metada can then be displayed by referencing the datamodel field where the metadata is stored after the options have been retrieved.

"dataModelBindings": {
  "simpleBinding": "Adresse.Kommune",
  "metadata": "Adresse.KommunerMetadata"
},

Related Issue(s)

Verification/QA

  • Manual functionality testing
    • I have tested these changes manually
    • Creator of the original issue (or service owner) has been contacted for manual testing (or will be contacted when released in alpha)
    • No testing done/necessary
  • Automated tests
    • Unit test(s) have been added/updated
    • Cypress E2E test(s) have been added/updated
    • No automatic tests are needed here (no functional changes/additions)
    • I want someone to help me make some tests
  • UU/WCAG (follow these guidelines until we have our own)
    • I have tested with a screen reader/keyboard navigation/automated wcag validator
    • No testing done/necessary (no DOM/visual changes)
    • I want someone to help me perform accessibility testing
  • User documentation @ altinn-studio-docs
  • Support in Altinn Studio
    • Issue(s) created for support in Studio
    • This change/feature does not require any changes to Altinn Studio
  • Sprint board
    • The original issue (or this PR itself) has been added to the Team Apps project and to the current sprint board
    • I don't have permissions to do that, please help me out
  • Labels
    • I have added a kind/* label to this PR for proper release notes grouping
    • I don't have permissions to add labels, please help me out

@Magnusrm Magnusrm changed the title add suggested config parameter Add option for saving codelist queryparameters in datamodel Oct 11, 2023
@Magnusrm Magnusrm added the kind/product-feature Pull requests containing new features label Nov 9, 2023
@Magnusrm Magnusrm marked this pull request as ready for review November 9, 2023 15:04
@@ -144,6 +144,13 @@ const common = {
'Describes the location in the data model where the component should store its value(s). A simple ' +
'binding is used for components that only store a single value, usually a string.',
),
IDataModelBindingsOptionsSimple: () =>
new CG.obj(new CG.prop('simpleBinding', new CG.str()), new CG.prop('metadata', new CG.str().optional()))
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, I'd like a description here for metadata 😊

Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

63.6% 63.6% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@Magnusrm Magnusrm merged commit 541cb14 into main Nov 14, 2023
@Magnusrm Magnusrm deleted the feat/save-options-metadata-in-datamodel branch November 14, 2023 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/product-feature Pull requests containing new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for getting the requested URL from a codelist for documentation
2 participants