Skip to content

Commit

Permalink
[DUOS-2835][DUOS-2878][risk=no] Use the url dataset property instead …
Browse files Browse the repository at this point in the history
…of the dbGap version (#2521)
  • Loading branch information
rushtong authored Apr 4, 2024
1 parent 532985a commit 546c1e3
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const sampleDataset = {
},
{
'dataSetId': 1408,
'propertyName': 'dbGAP',
'propertyName': 'url',
'propertyValue': 'http://...',
'propertyType': 'String'
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ const dar = {
'propertyId': null,
'dataSetId': 13,
'propertyKey': null,
'propertyName': 'dbGAP',
'propertyName': 'url',
'propertyValue': 'https://...',
'createDate': null,
'schemaProperty': null,
Expand Down
2 changes: 0 additions & 2 deletions public/DataSetSample.tsv

This file was deleted.

10 changes: 5 additions & 5 deletions src/components/data_update/DatasetUpdate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const DatasetUpdate = (props) => {
asProperty('Phenotype/Indication', formData.properties.phenotype),
asProperty('# of participants', formData.properties.nrParticipants),
asProperty('Description', formData.properties.description),
asProperty('dbGAP', formData.properties.dbGap),
asProperty('URL', formData.properties.url),
asProperty('Data Depositor', formData.properties.dataDepositor),
asProperty('Principal Investigator(PI)', formData.properties.principalInvestigator),
]
Expand Down Expand Up @@ -118,7 +118,7 @@ export const DatasetUpdate = (props) => {
phenotype: extract('Phenotype/Indication'),
nrParticipants: extract('# of participants'),
description: extract('Description'),
dbGap: extract('dbGAP'),
url: extract('url'),
dataDepositor: extract('Data Depositor'),
principalInvestigator: dataset?.study?.piName || extract('Principal Investigator(PI)'),
},
Expand Down Expand Up @@ -173,12 +173,12 @@ export const DatasetUpdate = (props) => {
}}
/>
<FormField
id="dbGap"
id="url"
title="Dataset Repository URL"
validators={[FormValidators.REQUIRED]}
defaultValue={formData.properties.dbGap}
defaultValue={formData.properties.url}
onChange={({ value }) => {
formData.properties.dbGap = value;
formData.properties.url = value;
}}
/>
<FormField
Expand Down
4 changes: 2 additions & 2 deletions src/components/modals/DacDatasetsModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const DacDatasetsModal = (props) => {
};

const getDbGapLinkValue = (properties) => {
const href = getPropertyValue(properties, 'dbGAP', '');
const href = getPropertyValue(properties, 'url', '');
return href.length > 0 ?
<a href={href} target={'_blank'} className={'enabled'} rel="noreferrer">Link</a> :
<span className={'disabled'}>---</span>;
Expand Down Expand Up @@ -72,7 +72,7 @@ const DacDatasetsModal = (props) => {
<tr key={'dac_datasets_table_head_row'}>
<th key={'1'} className={'table-titles dataset-color cell-size'}>Dataset Id</th>
<th key={'2'} className={'table-titles dataset-color cell-size'}>Dataset Name</th>
<th key={'3'} className={'table-titles dataset-color cell-size'}>dbGap</th>
<th key={'3'} className={'table-titles dataset-color cell-size'}>URL</th>
<th key={'4'} className={'table-titles dataset-color cell-size'}>Structured Data Use Limitations</th>
<th key={'5'} className={'table-titles dataset-color cell-size'}>Data Type</th>
<th key={'6'} className={'table-titles dataset-color cell-size'}>Phenotype/Indication</th>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/DatasetCatalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default function DatasetCatalog(props) {
row.checked = false;
row.ix = index;
row.dbGapLink =
getOr('')('propertyValue')(find({propertyName: 'dbGAP'})(row.properties));
getOr('')('propertyValue')(find({propertyName: 'url'})(row.properties));
// Extracting these fields to make sorting easier
row['Dataset ID'] = row.datasetIdentifier;
row['Data Access Committee'] = findDacName(localDacs, row);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/DatasetRegistration.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class DatasetRegistration extends Component {
let phenotype = fp.find({propertyName: 'Phenotype/Indication'})(dataset.properties);
let nrParticipants = fp.find({propertyName: '# of participants'})(dataset.properties);
let description = fp.find({propertyName: 'Description'})(dataset.properties);
let datasetRepoUrl = fp.find({propertyName: 'dbGAP'})(dataset.properties);
let datasetRepoUrl = fp.find({propertyName: 'url'})(dataset.properties);
let researcher = fp.find({propertyName: 'Data Depositor'})(dataset.properties);
let pi = fp.find({propertyName: 'Principal Investigator(PI)'})(dataset.properties);
let dac = fp.find({dacId: dataset.dacId})(this.state.dacList);
Expand Down Expand Up @@ -555,7 +555,7 @@ class DatasetRegistration extends Component {
properties.push({'propertyName': 'Description', 'propertyValue': formData.description});
}
if (formData.datasetRepoUrl) {
properties.push({'propertyName': 'dbGAP', 'propertyValue': formData.datasetRepoUrl});
properties.push({'propertyName': 'url', 'propertyValue': formData.datasetRepoUrl});
}
if (formData.researcher) {
properties.push({'propertyName': 'Data Depositor', 'propertyValue': formData.researcher});
Expand Down

0 comments on commit 546c1e3

Please sign in to comment.