From f53ba968e10965ccf1ee777c6cac740ac523f696 Mon Sep 17 00:00:00 2001 From: Gregory Rushton Date: Thu, 4 Apr 2024 14:17:09 -0400 Subject: [PATCH] [DUOS-2835][DUOS-2878][risk=no] Use the url dataset property instead of the dbGap version (#2278) Co-authored-by: aarohinadkarni <68303030+aarohinadkarni@users.noreply.github.com> --- .../consent/http/service/DatasetService.java | 3 --- src/main/resources/DataSetSample.tsv | 2 -- src/main/resources/changelog-master.xml | 2 ++ ...log-consent-2024-04-02-rm-old-dbgap-url.xml | 18 ++++++++++++++++++ 4 files changed, 20 insertions(+), 5 deletions(-) delete mode 100644 src/main/resources/DataSetSample.tsv create mode 100644 src/main/resources/changesets/changelog-consent-2024-04-02-rm-old-dbgap-url.xml diff --git a/src/main/java/org/broadinstitute/consent/http/service/DatasetService.java b/src/main/java/org/broadinstitute/consent/http/service/DatasetService.java index ac8cee8218..35db764c07 100644 --- a/src/main/java/org/broadinstitute/consent/http/service/DatasetService.java +++ b/src/main/java/org/broadinstitute/consent/http/service/DatasetService.java @@ -497,9 +497,6 @@ public Study convertDatasetToStudy(User user, Dataset dataset, StudyConversion s // Handle "URL" newPropConversion(dictionaries, dataset, "URL", "url", PropertyType.String, studyConversion.getUrl()); - // Handle "dbGAP" - legacyPropConversion(dictionaries, dataset, "dbGAP", "url", PropertyType.String, - studyConversion.getUrl()); } // Handle "Data Submitter User ID" diff --git a/src/main/resources/DataSetSample.tsv b/src/main/resources/DataSetSample.tsv deleted file mode 100644 index b50196782a..0000000000 --- a/src/main/resources/DataSetSample.tsv +++ /dev/null @@ -1,2 +0,0 @@ -Dataset Name Data Type Species Phenotype/Indication # of participants Description dbGAP Data Depositor Principal Investigator(PI) Sample Collection ID Consent ID -(Bucienne Monco) - Muc-1 Kidney Disease DNA, whole genome human muc-1, kidney disease 31 muc-1 patients that developed cancer , 5 weeks after treatment http://.... John Doe Mark Smith SC-20658 1 \ No newline at end of file diff --git a/src/main/resources/changelog-master.xml b/src/main/resources/changelog-master.xml index 22d09c65f3..37a0dc86ec 100644 --- a/src/main/resources/changelog-master.xml +++ b/src/main/resources/changelog-master.xml @@ -146,4 +146,6 @@ relativeToChangelogFile="true"/> + diff --git a/src/main/resources/changesets/changelog-consent-2024-04-02-rm-old-dbgap-url.xml b/src/main/resources/changesets/changelog-consent-2024-04-02-rm-old-dbgap-url.xml new file mode 100644 index 0000000000..bd0d6d227c --- /dev/null +++ b/src/main/resources/changesets/changelog-consent-2024-04-02-rm-old-dbgap-url.xml @@ -0,0 +1,18 @@ + + + + -- Remove duplicate properties + DELETE + FROM dataset_property + WHERE property_key IN (SELECT key_id FROM dictionary d WHERE KEY = 'dbGAP') + + + -- Remove deprecated property key from dictionary + DELETE + FROM dictionary + WHERE key = 'dbGAP'; + + +