Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Add an API to return suggested product type choices #1708

Merged
merged 3 commits into from
Mar 11, 2022

Conversation

jwalgran
Copy link
Contributor

@jwalgran jwalgran commented Mar 11, 2022

Overview

We allow contributors to submit any value for product type but expect that by suggesting standard values and values that have already been submitted we will have more standardization in the collected data.

We use a helper function so we can share the logic with a public API and with the claim form serializer which was already pulling a list of values. Now that we have migrated claims to use extended fields we can replace the old logic used to look for product types used on other claims.

Connects #1706

Demo

Screen Shot 2022-03-11 at 1 34 46 PM

Testing Instructions

Checklist

  • fixup! commits have been squashed
  • CI passes after rebase
  • CHANGELOG.md updated with summary of features or fixes, following Keep a Changelog guidelines

We allow contributors to submit any value for product type but expect that by
suggesting standard values and values that have already been submitted we will
have more standardization in the collected data.

We use a helper function so we can share the logic with a public API and with
the claim form serializer which was already pulling a list of values. Now that
we have migrated claims to use extended fields we can replace the old logic used
to look for product types used on other claims.
@jwalgran
Copy link
Contributor Author

There is a test of the claim form product types that I will fix up

Copy link
Contributor

@emilyhu0106 emilyhu0106 left a comment

Choose a reason for hiding this comment

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

This endpoint works really well, especially the helper function that works for both claim form and public API

The values for production type and product type now come from extended fields
rather than claims.
@jwalgran
Copy link
Contributor Author

Thanks for the review.

@jwalgran jwalgran merged commit 78ceaf4 into develop Mar 11, 2022
@jwalgran jwalgran deleted the feature/jcw/product-types-api branch March 11, 2022 21:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants