-
Notifications
You must be signed in to change notification settings - Fork 19
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
Conversation
@@ -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): |
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.
ADD COLUMN last_update timestamp with time zone; | ||
|
||
COMMENT ON COLUMN ag.ag_kit_barcodes.last_update | ||
IS 'Sample metadata update timestamp'; |
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.
As a field name, last_update
is ambiguous. Can the field reflect the type of update it corresponds too?
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.
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.
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.