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-106: Saving regions on project/ survey create/ update #1055

Merged
merged 31 commits into from
Jul 20, 2023

Conversation

al-rosenthal
Copy link
Contributor

@al-rosenthal al-rosenthal commented Jul 18, 2023

Overview

Links to Jira tickets

SIMSBIOHUB-106

Description of relevant changes

  • Added new service and repo to facilitate region saving
  • Modified project create/ edit functions to save regions
  • Modified survey create/ edit functions to save regions
  • Updated Project list to fill region column

PR Testing

Regions on a project

  1. Create a new project
  2. Navigate to project list page
  3. See region column filled for your new project
  4. Edit newly created project
  5. Update region to a new region
  6. Navigate back to project list page
  7. See updated region for your new project

Regions on a survey

  1. Create a new survey
  2. Add a region while creating survey
  3. Open DBeaver and check the survey_region table for new entries related to the newly created survey
  4. Edit the survey and update to a new region
  5. Open DBeaver and check the survey_region table for new entries related to the newly created survey

PR Checklist

A list of items that are good to consider when making any changes.

Note: this list is not exhaustive, and not all items are always applicable.

Code

  • New files/classes/functions have appropriately descriptive names and comment blocks to describe their use/behaviour
  • I have avoided duplicating code when possible, moving re-usable pieces into functions
  • I have avoided hard-coding values where possible and moved any re-usable constants to a constants file
  • My code is as flat as possible (avoids deeply nested if/else blocks, promise chains, etc)
  • My code changes account for null/undefined values and handle errors appropriately
  • My code uses types/interfaces to help describe values/parameters/etc, help ensure type safety, and improve readability

Style

  • My code follows the established style conventions
  • My code uses native material-ui components/icons/conventions when possible

Documentation

  • I have commented my code sufficiently, such that an unfamiliar developer could understand my code
  • I have added/updated README's and related documentation, as needed

Tests

  • I have added/updated unit tests for any code I've added/updated
  • I have added/updated the Postman requests/tests to account for any API endpoints I've added/updated

Linting/Formatting

  • I have run the linter and fixed any issues, as needed
    See the lint commands in package.json
  • I have run the formatter and fixed any issues, as needed
    See the format commands in package.json

SonarCloud

  • I have addressed all SonarCloud Bugs, Vulnerabilities, Security Hotspots, and Code Smells

@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #1055 (eaa51d5) into dev (2f48df0) will increase coverage by 0.05%.
The diff coverage is 77.89%.

@@            Coverage Diff             @@
##              dev    #1055      +/-   ##
==========================================
+ Coverage   67.70%   67.76%   +0.05%     
==========================================
  Files         401      403       +2     
  Lines       12397    12481      +84     
  Branches     2093     2101       +8     
==========================================
+ Hits         8394     8458      +64     
- Misses       3472     3489      +17     
- Partials      531      534       +3     
Impacted Files Coverage Δ
api/src/openapi/schemas/project.ts 100.00% <ø> (ø)
api/src/paths/project/list.ts 96.29% <ø> (ø)
api/src/paths/project/{projectId}/update.ts 91.52% <ø> (ø)
api/src/repositories/project-repository.ts 71.68% <ø> (ø)
app/src/components/chips/SubmitStatusChip.tsx 46.66% <ø> (ø)
.../features/projects/list/ProjectsListFilterForm.tsx 13.33% <ø> (ø)
...pp/src/features/projects/list/ProjectsListPage.tsx 78.26% <ø> (ø)
...p/src/features/projects/list/ProjectsListTable.tsx 59.09% <0.00%> (-13.64%) ⬇️
api/src/services/survey-service.ts 82.08% <14.28%> (-2.86%) ⬇️
api/src/services/project-service.ts 26.26% <16.66%> (-0.28%) ⬇️
... and 4 more

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

@al-rosenthal al-rosenthal marked this pull request as ready for review July 19, 2023 00:22
@al-rosenthal al-rosenthal requested a review from jeznorth July 19, 2023 00:22
api/src/services/region-service.ts Outdated Show resolved Hide resolved
api/src/services/region-service.ts Outdated Show resolved Hide resolved
curtisupshall
curtisupshall previously approved these changes Jul 19, 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!

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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
0.0% 0.0% Duplication

@al-rosenthal al-rosenthal merged commit 28c4836 into dev Jul 20, 2023
@al-rosenthal al-rosenthal deleted the SIMSBIOHUB-106 branch July 20, 2023 00:01
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