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

SIMSBIOHUB-159: Move project_type to survey_type #1074

Merged
merged 11 commits into from
Aug 28, 2023
Merged

Conversation

NickPhura
Copy link
Collaborator

@NickPhura NickPhura commented Aug 23, 2023

Links to Jira Tickets

https://apps.nrs.gov.bc.ca/int/jira/browse/SIMSBIOHUB-159

Description of Changes

Primary Changes

Migrations

  • New migration to add survey_type table, migrate existing project_type values, drop project_type table

API/APP

  • Update API to remove all project_type code, and add corresponding survey_type code
  • Update APP to remove all project_type code, and add corresponding survey_type code

Other Changes

Migrations

  • Added a few missed indexes/unique constraints on some recent migrations.

Seed

  • Enhanced the project/survey seed to use more randomly selected lookup values and generated field values.

Testing Notes

Project type should no longer appear anywhere at the project level.

  • Existing project types should be migrated to their child surveys
    • I did test against 2 projects, and multiple surveys, to see that the types were migrated correctly. But a second pass at this by is probably not a bad idea.

Surveys should now have a new survey type field in the UI.

  • Creating/Viewing/Editing surveys should work

@codecov
Copy link

codecov bot commented Aug 23, 2023

Codecov Report

Merging #1074 (4cc99f5) into dev (05d3902) will increase coverage by 0.07%.
The diff coverage is 64.58%.

@@            Coverage Diff             @@
##              dev    #1074      +/-   ##
==========================================
+ Coverage   64.60%   64.67%   +0.07%     
==========================================
  Files         433      433              
  Lines       13193    13199       +6     
  Branches     2138     2137       -1     
==========================================
+ Hits         8523     8537      +14     
+ Misses       4147     4137      -10     
- Partials      523      525       +2     
Files Changed Coverage Δ
api/src/constants/codes.ts 100.00% <ø> (ø)
api/src/models/project-create.ts 93.47% <ø> (-0.14%) ⬇️
api/src/models/project-update.ts 100.00% <ø> (ø)
api/src/models/project-view.ts 100.00% <ø> (ø)
api/src/models/survey-create.ts 91.30% <0.00%> (-2.03%) ⬇️
api/src/openapi/schemas/project.ts 100.00% <ø> (ø)
api/src/paths/codes.ts 100.00% <ø> (ø)
api/src/paths/project/{projectId}/survey/create.ts 96.15% <ø> (ø)
api/src/paths/project/{projectId}/survey/list.ts 96.66% <ø> (ø)
...hs/project/{projectId}/survey/{surveyId}/update.ts 96.29% <ø> (ø)
... and 24 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@NickPhura NickPhura marked this pull request as ready for review August 23, 2023 17:03
al-rosenthal
al-rosenthal previously approved these changes Aug 24, 2023
Copy link
Contributor

@al-rosenthal al-rosenthal left a comment

Choose a reason for hiding this comment

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

ran this locally, looks good 🌤️

al-rosenthal
al-rosenthal previously approved these changes Aug 24, 2023
Copy link
Contributor

@al-rosenthal al-rosenthal left a comment

Choose a reason for hiding this comment

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

☀️

Copy link
Contributor

@al-rosenthal al-rosenthal left a comment

Choose a reason for hiding this comment

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

🏂

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
4.5% 4.5% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

Copy link
Contributor

@curtisupshall curtisupshall left a comment

Choose a reason for hiding this comment

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

Code looks good!

@NickPhura NickPhura merged commit 0e5cf65 into dev Aug 28, 2023
@NickPhura NickPhura deleted the SIMSBIOHUB-159 branch August 28, 2023 18:35
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