From 7593979becfc63a285784e3e621d39eabfcc6460 Mon Sep 17 00:00:00 2001 From: Douglas Rioux Date: Thu, 27 Jul 2023 13:41:31 -0400 Subject: [PATCH] Add note to case + corresponding embeds --- src/encoded/schemas/case.json | 19 +++++++++++++++++++ src/encoded/types/case.py | 4 ++++ 2 files changed, 23 insertions(+) diff --git a/src/encoded/schemas/case.json b/src/encoded/schemas/case.json index c919a52f8e..c7ec04f402 100644 --- a/src/encoded/schemas/case.json +++ b/src/encoded/schemas/case.json @@ -150,6 +150,12 @@ "exclude_from": [ "FFedit-create" ] + }, + "note": { + "title": "Note", + "description": "Notes for this case", + "type": "string", + "linkTo": "NoteStandard" } }, "facets": { @@ -329,6 +335,19 @@ "title": "Report Last Modified Date" } ] + }, + "notes": { + "title": "Notes", + "sort_fields": [ + { + "field": "note.last_text_edited.date_text_edited", + "title": "Last Edit Date" + }, + { + "field": "note.last_text_edited.text_edited_by.display_title", + "title": "Last Edit User" + } + ] } } } diff --git a/src/encoded/types/case.py b/src/encoded/types/case.py index 4da1da1c72..eabe0eed10 100644 --- a/src/encoded/types/case.py +++ b/src/encoded/types/case.py @@ -253,6 +253,10 @@ def _build_case_embedded_list(): # File linkTo "structural_variant_vcf_file.file_ingestion_status", "structural_variant_vcf_file.accession", + # Note linkTo + "note.note_text", + "note.last_text_edited.date_text_edited", + "note.last_text_edited.text_edited_by.display_title", ]