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-530: Unique Key Constraint on Survey Funding Source #1244

Merged
merged 4 commits into from
Mar 15, 2024

Conversation

KjartanE
Copy link
Contributor

Links to Jira Tickets

Description of Changes

  • added Unique Key Constraint on Survey Funding Source table
  • create yup schema validation for no duplicate funding source

Testing Notes

  • {List any relevant testing considerations, necessary pre-reqs, and areas of the app to focus on. Specifically, include anything that will help the reviewers of this PR verify the code is functioning as expected.}

@KjartanE KjartanE requested review from NickPhura and jeznorth March 15, 2024 17:46
@KjartanE KjartanE added the Ready For Review PR is ready for review label Mar 15, 2024
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 and it works. It would be great if the funding sources were also highlighted in red, the error text is easy to miss if you have to scroll through the form to find the issue

@codecov-commenter
Copy link

codecov-commenter commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 54.54%. Comparing base (0daa88d) to head (0932839).

Files Patch % Lines
app/src/utils/YupSchema.ts 25.00% 6 Missing ⚠️
...res/surveys/components/SurveyFundingSourceForm.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1244      +/-   ##
==========================================
- Coverage   54.56%   54.54%   -0.02%     
==========================================
  Files         599      599              
  Lines       18392    18401       +9     
  Branches     2837     2839       +2     
==========================================
+ Hits        10035    10037       +2     
- Misses       7703     7710       +7     
  Partials      654      654              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@NickPhura
Copy link
Collaborator

ran this locally and it works. It would be great if the funding sources were also highlighted in red, the error text is easy to miss if you have to scroll through the form to find the issue

Agreed. Though it looks like this matches the current behaviour of permits (which has the same unique constraint), so maybe something we can leave for a future ticket

Copy link

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@KjartanE KjartanE merged commit e29b1f7 into dev Mar 15, 2024
17 checks passed
@KjartanE KjartanE deleted the SIMSBIOHUB-530 branch March 15, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants