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

chore: update formatRawProjectTypes to reference schema instead of static database table #445

Merged
merged 6 commits into from
Jul 12, 2024

Conversation

jessicamcinchak
Copy link
Member

@jessicamcinchak jessicamcinchak commented Jul 11, 2024

The project_types database table is very static and this has been causing complaints of 'not found' project types in Notify email templates. Checking against the ODP Schema "ProjectType" definition should ensure a much more up-to-date list and fewer unknowns

Changes:

  • Updates the formatRawProjectTypes function to reference the schema instead of making a GraphQL query
  • Moves out of requests and into utils since it is no longer async nor requires a permission-scoped $client
  • Adds tests
  • Adds a polyfill for Intl.ListFormat via https://formatjs.io/docs/polyfills/intl-listformat/ as we see this popup occassionally via Airbrake !

Future planx-new PRs:

@jessicamcinchak
Copy link
Member Author

@jessicamcinchak jessicamcinchak marked this pull request as ready for review July 12, 2024 07:56
@jessicamcinchak jessicamcinchak requested a review from a team July 12, 2024 07:56
Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

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

One small question!

package.json Outdated Show resolved Hide resolved
@jessicamcinchak jessicamcinchak merged commit eb3b635 into main Jul 12, 2024
3 checks passed
@jessicamcinchak jessicamcinchak deleted the jess/update-formatRawProjectTypes-schema branch July 12, 2024 11:23
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