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

🐛 Sort Questionnaire items on fetch #1593

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

sjd78
Copy link
Member

@sjd78 sjd78 commented Dec 6, 2023

A questionnaire's sections, questions and answers all have a order key. The key needs to be present in the defining yaml file, but does not need to be in sorted order. To ensure that the UI always has questionnaire items in proper order order, sort everything in the fetch hooks.

Note: Hub returns the questionnaire in the same order as the original yaml file. We need to make sure things are sorted properly.

A questionnaire's sections, questions and answers all have a order
key.  The key needs to be present in the defining yaml file, but
does not need to be in sorted order.  To ensure that the UI always
has questionnaire items in proper order order, sort everything in
the fetch hooks.

Note: Hub returns the questionnaire in the same order as the original
yaml file.  We need to make sure things are sorted properly.

Signed-off-by: Scott J Dickerson <[email protected]>
@sjd78 sjd78 requested a review from ibolton336 December 6, 2023 21:20
Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (cc14acb) 39.36% compared to head (5a07d50) 39.27%.

Files Patch % Lines
client/src/app/queries/questionnaires.ts 0.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1593      +/-   ##
==========================================
- Coverage   39.36%   39.27%   -0.09%     
==========================================
  Files         146      146              
  Lines        4816     4827      +11     
  Branches     1152     1152              
==========================================
  Hits         1896     1896              
- Misses       2906     2917      +11     
  Partials       14       14              
Flag Coverage Δ
client 39.27% <0.00%> (-0.09%) ⬇️
server ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Member

@ibolton336 ibolton336 left a comment

Choose a reason for hiding this comment

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

Works great! LGTM

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