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

fix(ProcessEditor): SelectDataType should append current selected value to the option list #12933

Merged
merged 7 commits into from
Jun 7, 2024

Conversation

framitdavid
Copy link
Collaborator

@framitdavid framitdavid commented Jun 7, 2024

Description

If the previously selected data type did not exist in the list of available data types, the combo box would crash. I resolved this by checking if the selected value exists and adding it to the list of available options.

Related Issue(s)

  • PR itself

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)

@github-actions github-actions bot added area/process Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc). solution/studio/designer Issues related to the Altinn Studio Designer solution. labels Jun 7, 2024
@framitdavid framitdavid changed the title fix(ProcessEditor): SelectDataType should append current selected val… fix(ProcessEditor): SelectDataType should append current selected value to the option list Jun 7, 2024
@framitdavid framitdavid added the skip-releasenotes Issues that do not make sense to list in our release notes label Jun 7, 2024
@framitdavid
Copy link
Collaborator Author

framitdavid commented Jun 7, 2024

Added skip-releasenotes because this bug was never shipped to production.

Copy link
Member

@nkylstad nkylstad left a comment

Choose a reason for hiding this comment

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

Is it possible to add a unit test for this scenario? Since this is a blocker for deploy we should merge it asap, but maybe a separate pr with a test or two if that's possible 😊

Copy link

codecov bot commented Jun 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.11%. Comparing base (bf84169) to head (0ae8c03).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12933   +/-   ##
=======================================
  Coverage   91.11%   91.11%           
=======================================
  Files        1394     1394           
  Lines       19757    19758    +1     
  Branches     2394     2395    +1     
=======================================
+ Hits        18002    18003    +1     
  Misses       1493     1493           
  Partials      262      262           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@framitdavid
Copy link
Collaborator Author

Is it possible to add a unit test for this scenario? Since this is a blocker for deploy we should merge it asap, but maybe a separate pr with a test or two if that's possible 😊

Just added one test for it now! :)

@framitdavid framitdavid added added-to-sprint kind/bug Used when there is a defect / something is not working as it should. labels Jun 7, 2024
@framitdavid framitdavid merged commit 0367ba2 into main Jun 7, 2024
10 checks passed
@framitdavid framitdavid deleted the fix/selectDatamodelShouldNotCrash branch June 7, 2024 08:35
@JamalAlabdullah JamalAlabdullah self-assigned this Jun 7, 2024
@JamalAlabdullah
Copy link
Contributor

Tested ok i dev

@JamalAlabdullah JamalAlabdullah removed their assignment Jun 7, 2024
Jondyr pushed a commit that referenced this pull request Jun 10, 2024
…ue to the option list (#12933)

* fix(ProcessEditor): SelectDataType should append current selected value to the option list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
added-to-sprint area/process Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc). kind/bug Used when there is a defect / something is not working as it should. skip-releasenotes Issues that do not make sense to list in our release notes solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants