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

[DCJ-627][risk=low] Remove deprecated Dataset needsApproval and active state attributes from consent service and database #2399

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ public interface DacDAO extends Transactional<DacDAO> {
d.name AS dataset_name,
DATE(d.create_date) AS dataset_create_date,
d.object_id,
d.active,
d.needs_approval,
d.alias AS dataset_alias,
d.create_user_id,
d.update_date AS dataset_update_date,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,6 @@ public class Dataset {

private Integer updateUserId;

/**
* Active is a deprecated property. The visibility of a dataset is calculated from DAC approval
* and the public visibility dataset property
*/
@Deprecated(forRemoval = true)
private Boolean active;

/**
* Needs Approval is a deprecated property. The visibility of a dataset is calculated from DAC
* approval and the public visibility dataset property
*/
@Deprecated(forRemoval = true)
private Boolean needsApproval;

private Integer alias;

private String datasetIdentifier;
Expand Down Expand Up @@ -188,22 +174,6 @@ public void addProperty(DatasetProperty property) {
this.properties.add(property);
}

public Boolean getActive() {
return active;
}

public void setActive(Boolean active) {
this.active = active;
}

public Boolean getNeedsApproval() {
return needsApproval;
}

public void setNeedsApproval(Boolean needsApproval) {
this.needsApproval = needsApproval;
}

public Boolean getDacApproval() {
return dacApproval;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ public class DatasetDTO {
@JsonProperty
private List<DatasetPropertyDTO> properties;

@JsonProperty
private Boolean active;

@JsonProperty
private Boolean needsApproval;

@JsonProperty
private Boolean isAssociatedToDataOwners;

Expand Down Expand Up @@ -115,22 +109,6 @@ public void setProperties(List<DatasetPropertyDTO> properties) {
this.properties = properties;
}

public Boolean getActive() {
return active;
}

public void setActive(Boolean active) {
this.active = active;
}

public Boolean getNeedsApproval() {
return needsApproval;
}

public void setNeedsApproval(Boolean needsApproval) {
this.needsApproval = needsApproval;
}

public Boolean getIsAssociatedToDataOwners() {
return isAssociatedToDataOwners;
}
Expand Down
8 changes: 0 additions & 8 deletions src/main/resources/assets/schemas/Dataset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@ properties:
study:
$ref: "./Study.yaml"
description: The study which produced this dataset.
active:
type: boolean
description: The Dataset is active
deprecated: true
needsApproval:
type: boolean
description: The Dataset need Data Owners approval
deprecated: true
alias:
type: string
description: The dataset id, short format
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/changelog-master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,6 @@
relativeToChangelogFile="true"/>
<include file="changesets/changelog-consent-2024-08-28-rm-consents.xml"
relativeToChangelogFile="true"/>
<include file="changesets/changelog-consent-2024-09-04-drop-deprecated-dataset-columns-.xml"
relativeToChangelogFile="true"/>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet id="changelog-consent-2024-09-04-drop-deprecated-dataset-columns" author="otchet-broad">
<dropColumn tableName="dataset" columnName="needs_approval"/>
<dropColumn tableName="dataset" columnName="active"/>
</changeSet>
</databaseChangeLog>
6 changes: 2 additions & 4 deletions src/main/resources/test-data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,9 @@
<!--insert researcher user-->
<changeSet author="rfricke" id="test-dataset">
<sql>
INSERT INTO dataset (name, active, needs_approval)
INSERT INTO dataset (name)
SELECT
dac.name,
't',
'f'
dac.name
FROM dac
</sql>
</changeSet>
Expand Down
Loading