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-648: Create Sampling Period Page #1446

Open
wants to merge 13 commits into
base: dev
Choose a base branch
from
Open

Conversation

mauberti-bc
Copy link
Collaborator

@mauberti-bc mauberti-bc commented Dec 5, 2024

Links to Jira Tickets

  • {Include a link to all applicable Jira tickets}

Description of Changes

  • Adds pages for creating and editing sampling periods
  • Removes the ability to create sampling periods while creating a sampling site
  • Moves the sample-method/{methodId}/sample-period endpoints to survey/sample-site/sample-period, for bulk actions

Testing Notes

  • Should be able to create, edit and delete sampling periods
  • Should be able to create sampling sites without methods or periods

@mauberti-bc mauberti-bc added the Early Feedback Welcome PR is not finished, but early review feedback is welcomed label Dec 5, 2024
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 22.44009% with 356 lines in your changes missing coverage. Please review.

Project coverage is 46.08%. Comparing base (c8dfb81) to head (c377633).

Files with missing lines Patch % Lines
...g-information/sites/SamplingSiteTableContainer.tsx 0.00% 49 Missing ⚠️
...ng-information/periods/SamplingPeriodContainer.tsx 0.00% 48 Missing ⚠️
...lds/AutocompleteSearch/AutocompleteSearchField.tsx 0.00% 41 Missing ⚠️
...-information/periods/edit/EditSamplePeriodPage.tsx 0.00% 39 Missing ⚠️
...ormation/periods/create/CreateSamplePeriodPage.tsx 0.00% 36 Missing ⚠️
...-information/periods/table/SamplingPeriodTable.tsx 0.00% 29 Missing ⚠️
...ods/form/components/sites/SamplePeriodSiteForm.tsx 0.00% 24 Missing ⚠️
...components/technique/SamplePeriodTechniqueForm.tsx 0.00% 23 Missing ⚠️
app/src/hooks/api/usePeriodApi.ts 6.25% 15 Missing ⚠️
...ion/periods/form/create/CreateSamplePeriodForm.tsx 0.00% 13 Missing ⚠️
... and 12 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1446      +/-   ##
==========================================
+ Coverage   45.93%   46.08%   +0.15%     
==========================================
  Files         848      853       +5     
  Lines       22452    22572     +120     
  Branches     3333     3334       +1     
==========================================
+ Hits        10313    10402      +89     
- Misses      11529    11559      +30     
- Partials      610      611       +1     

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

@mauberti-bc mauberti-bc added Ready For Review PR is ready for review and removed Early Feedback Welcome PR is not finished, but early review feedback is welcomed labels Dec 10, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
9.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@mauberti-bc mauberti-bc marked this pull request as ready for review December 12, 2024 20:40
@NickPhura
Copy link
Collaborator

A few things I noticed:


When creating a period, if you select a site, and then remove the period from it, the validation is probably failing because the form won't submit, but there is no error message shown.

image


When editing an existing sample period, I can't select or change the sample sites.

image


Nit: I can save a period with a start and end date that are exactly the same (with no time).

image

If I pick the same times, then the save stops working, though there is no error message about why.


I have 1 sampling site, 1 technique, and 3 periods. The techniques aren't being combined in the observations table when adding a record:

image

@mauberti-bc
Copy link
Collaborator Author

  • I disallowed changing the site because at that point you may as well create a new period for the correct site and delete the wrong one. Seems along the lines of turning a skateboard into a car instead of just buying a car. Maybe worth allowing though?
  • We do want to allow a period that starts and stops on the same day with no time, in case the time is not known. I agree this seems off but is realistic data. (The duration column is null for those periods because there isn't an obvious way to represent the unknown duration)

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.

2 participants