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-148: Create New Agency Database Table to Support All Agencies #1057

Merged
merged 12 commits into from
Jul 26, 2023

Conversation

NickPhura
Copy link
Collaborator

@NickPhura NickPhura commented Jul 21, 2023

Links to Jira Tickets

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

Description of Changes

Funding Source -> Agency

  • New migration to update existing funding_source table to agency.
    • Update columns, indexes, constraints, sequences, etc that used funding_source in their name. Rename to use agency.
    • Inserts new agency values (from static coordinator agency list)
  • Removed static coordinator agency list
  • Update tr_project_funding_source trigger to reference renamed agency table and columns.
  • Rename instances of functions/variables that use funding_source to use agency
    • Renamed/expanded some shortened variable names fs (aka: funding_source) to agency
    • Related: expanded some other related shortened variable names pfs to project_funding_source for clarity
  • Small fix for issue in region-service in Dev (including in this PR for simplicity)

Other

Documentation

  • Updated database README to add documentation on database naming conventions, and sample migrations, and things to consider when writing a migration, etc.

Testing Notes

  • Focus testing effort on anything related to Funding (project and survey level).
    • The app should function the exact same as before.

- remove static coordinator agency list
- update coordinator agency codes list to use funding_source values
Update readme to include sample migration code and naming conventions, etc.
@NickPhura NickPhura changed the title SIMSBIOHUB-148 SIMSBIOHUB-148: Funding Source -> Agency Jul 21, 2023
@NickPhura NickPhura changed the title SIMSBIOHUB-148: Funding Source -> Agency SIMSBIOHUB-148: Create New Agency Database Table to Support All Agencies Jul 21, 2023
@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #1057 (ef5e3e3) into dev (afaf9a1) will decrease coverage by 0.03%.
The diff coverage is 36.36%.

@@            Coverage Diff             @@
##              dev    #1057      +/-   ##
==========================================
- Coverage   67.76%   67.73%   -0.03%     
==========================================
  Files         403      403              
  Lines       12481    12473       -8     
  Branches     2101     2101              
==========================================
- Hits         8458     8449       -9     
  Misses       3489     3489              
- Partials      534      535       +1     
Files Changed Coverage Δ
api/src/constants/codes.ts 100.00% <ø> (ø)
api/src/models/survey-view.ts 100.00% <ø> (ø)
api/src/paths/codes.ts 100.00% <ø> (ø)
api/src/paths/project/{projectId}/survey/list.ts 96.66% <ø> (ø)
...aths/project/{projectId}/survey/{surveyId}/view.ts 95.83% <ø> (ø)
api/src/repositories/survey-repository.ts 94.85% <ø> (ø)
...eatures/projects/components/ProjectFundingForm.tsx 78.37% <ø> (ø)
app/src/features/projects/edit/EditProjectForm.tsx 0.00% <0.00%> (ø)
.../features/projects/list/ProjectsListFilterForm.tsx 13.33% <0.00%> (ø)
...p/src/features/projects/list/ProjectsListTable.tsx 59.09% <ø> (ø)
... and 12 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 July 21, 2023 22:27
curtisupshall
curtisupshall previously approved these changes Jul 24, 2023
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!

al-rosenthal
al-rosenthal previously approved these changes Jul 25, 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 locally and things are working as expected. Great examples in the read me

@NickPhura NickPhura dismissed stale reviews from al-rosenthal and curtisupshall via ef5e3e3 July 25, 2023 21:48
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
9.1% 9.1% Duplication

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

@KjartanE KjartanE self-assigned this Jul 26, 2023
Copy link
Contributor

@KjartanE KjartanE left a comment

Choose a reason for hiding this comment

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

Ran locally, works as intended! 😹

@NickPhura NickPhura merged commit 1aa1724 into dev Jul 26, 2023
@NickPhura NickPhura deleted the SIMSBIOHUB-148 branch July 26, 2023 19:16
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.

4 participants