-
Notifications
You must be signed in to change notification settings - Fork 9
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
base: dev
Are you sure you want to change the base?
Conversation
Openshift URLs for the PR Deployment: |
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. When editing an existing sample period, I can't select or change the sample sites. Nit: I can save a period with a start and end date that are exactly the same (with no time). 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: |
|
Fix some api tests. Remove some deprecated code.
Fix some existing req.query parsing logic.
…ompleteSearchField.tsx.
Remove unused api param from delete observations endpoint. Minor tweak to find endpoint filter type (allow them to be undefined as they were meant to be)
- Rename/refactor sample method migrations to come after the upgrade postgres migration.
Heres some screenshots of some of the issues I found:
|
- Fix techniques pagination (on both survey technique page, and manage sampling information page). - Fix delete sample sites sql error. - Update APIError -> HTTPError code.
Pushed up some changes that should address those 3 issues. |
database/src/procedures/tr_before_survey_sample_period_check_minimum_data_requirements.ts
Outdated
Show resolved
Hide resolved
…le (instead of separate trigger).
app/src/features/surveys/sampling-information/techniques/edit/EditTechniquePage.tsx
Outdated
Show resolved
Hide resolved
app/src/features/surveys/sampling-information/techniques/create/CreateTechniquePage.tsx
Outdated
Show resolved
Hide resolved
database/src/migrations/20250117000001_survey_sample_period_check_constraints.ts
Show resolved
Hide resolved
Fix error message.
Add unit tests for sample period matching functions.
Add unit tests
Quality Gate failedFailed conditions See analysis details on SonarQube Cloud Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE |
@@ -21,15 +22,15 @@ interface ICaptureStub { | |||
* @returns {string | undefined} | |||
*/ | |||
export const formatTimeString = (time?: string | null): string | undefined => { | |||
const fullTime = dayjs(time, 'HH:mm:ss'); | |||
const fullTime = dayjs(time, DefaultTimeFormat); | |||
const shortTime = dayjs(time, 'HH:mm'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This can be updated to the new DefaultTimeFormatNoSeconds
Links to Jira Tickets
Description of Changes
The main goal of this PR is to separate the sampling site and sampling period CRUD operations. Previously sampling periods were created/updated as part of creating/updating a sampling site. Now, sampling periods have their own create/edit pages/components.
All of the changes are around that concept, handling all of the code that naturally broke as a result of the related database schema changes, and workflow changes, etc.
Testing Notes
New DB Schema
Picture of the relevant tables, and how they look after running the migration:
New Functionality
Updated Functionality