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

feat: Multiple Parse Options support Stage1b - Add parseConfig to forms response and service models #242

Merged
merged 9 commits into from
Feb 24, 2025

Conversation

timDeHof
Copy link
Contributor

@timDeHof timDeHof commented Feb 18, 2025

Description

Added support for adding the parseConfig field to fetching of form questions configuration, along with flexibility. This new optional field allows for additional configuration parameters to be stored for different question types, such as:

  • Icon-based radio buttons
  • Scale questions with custom min/max labels
  • Boolean questions with custom yes/no text

In addition, A new wiki page was created called Form Input types v2

The changes include:

  1. Added parseConfig field to OptionChoice and BaseQuestion classes
  2. Updated form selection queries to include the new field
  3. Added proper validation and Swagger documentation

Issue link

Fixes # 86b3u7ygj

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature updates / changes
  • Tests
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

The changes have been tested through:

  1. API endpoint testing to verify parseConfig is properly saved and retrieved
  2. Validation of parseConfig object structure
  3. Swagger documentation generation
  4. Existing functionality remains unchanged

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have updated the change log

- Added optional parseConfig field to OptionChoice and BaseQuestion models
- Updated form service and sprint service to include parseConfig in select queries
- Extended FormResponseDto to support parseConfig with validation
- Added example configurations for icon, boolean, and scale question types
@timDeHof
Copy link
Contributor Author

Yes, I agree that its better to keep it just parseConfig, I think I was just trying to find a good way to present it in the examples for the form response. Hopefully the simpler parseConfig example structure in forms response models would make it easier to understand.

@timDeHof timDeHof requested a review from cherylli February 20, 2025 02:33
@cherylli
Copy link
Contributor

Yes, I agree that its better to keep it just parseConfig, I think I was just trying to find a good way to present it in the examples for the form response. Hopefully the simpler parseConfig example structure in forms response models would make it easier to understand.

I think if needed, we can do something like this,

parseConfig: {
  type: "scale" // could use an enum for this, the type could indicate what values it has
  min: 0,
....

I also noticed just now, most example have no "value" but some has a "value" key. Should we standardize it?

@cherylli
Copy link
Contributor

I see this on my end, 2 levels of parseConfig
image

but the actual responses are
image
image

A couple of tests are failing for me

image

- Added optional parseConfig to MeetingFormResponse
- Updated sprint service and controller test files to include parseConfig
- Added parseConfig to mock data and service query selection
@timDeHof
Copy link
Contributor Author

I see this on my end, 2 levels of parseConfig image

but the actual responses are image image

A couple of tests are failing for me

image

I updated the mock-data for the tests and fix the double parseConfigs.

Copy link
Contributor

@cherylli cherylli left a comment

Choose a reason for hiding this comment

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

Thanks.

Looks good on swagger ✅
Ran all tests locally ✅

@timDeHof timDeHof merged commit 467b57e into dev Feb 24, 2025
1 check passed
@timDeHof timDeHof deleted the feat/add-parseConfig-to-form-services branch February 24, 2025 03:07
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.

3 participants