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

added last_update column to ag_kit_barcodes #558

Merged
merged 6 commits into from
Feb 9, 2024

Conversation

ayobi
Copy link
Contributor

@ayobi ayobi commented Jan 29, 2024

Added last_update column to ag_kit_barcodes table. This will enable a more descriptive sample status on the 'My Reports' tab. See PR for microsetta-interface for FE changes.

@@ -51,7 +52,7 @@ def from_db(cls, sample_id, date_collected, time_collected,
datetime_collected = datetime.combine(date_collected,
time_collected)
return cls(sample_id, datetime_collected, site, notes, barcode,
latest_scan_timestamp, source_id,
latest_scan_timestamp, last_update, source_id,
account_id, sample_projects, latest_scan_status)

def to_api(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this PR is changing what the API returns for a sample, can you please update the corresponding component and schema entries in the YAML file?

ADD COLUMN last_update timestamp with time zone;

COMMENT ON COLUMN ag.ag_kit_barcodes.last_update
IS 'Sample metadata update timestamp';
Copy link
Member

Choose a reason for hiding this comment

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

As a field name, last_update is ambiguous. Can the field reflect the type of update it corresponds too?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's change this field name to latest_sample_information_update to clearly state that it's only tracking the info that belongs directly to a sample (e.g. collection date/time and type) and is ignoring other associations like metadata.

Also, we do not need to null the column when a sample is deleted, but it would be beneficial to add a comment to the sample deletion code noting this decision and suggesting it be revisited if we ever use the new column for anything other than its current purpose of UI enhancement.

@cassidysymons cassidysymons merged commit 2096e14 into biocore:master Feb 9, 2024
2 checks passed
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.

3 participants