Skip to content
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 @@ -353,7 +353,7 @@ public static DataAccessRequest populateProgressReportFromJsonString(
originalDataCopy.setExternalCollaborators(newData.getExternalCollaborators());
originalDataCopy.setLabCollaborators(newData.getLabCollaborators());
originalDataCopy.setProgressReportSummary(newData.getProgressReportSummary());
originalDataCopy.setIntellectualProperty(newData.getIntellectualProperty());
originalDataCopy.setIntellectualProperties(newData.getIntellectualProperties());
originalDataCopy.setPublications(newData.getPublications());
originalDataCopy.setPresentations(newData.getPresentations());
originalDataCopy.setDmi(newData.getDmi());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public class DataAccessRequestData {

// Progress Report/Closeout Fields
private String progressReportSummary;
private List<IntellectualProperty> intellectualProperty;
private List<IntellectualProperty> intellectualProperties;
private List<Publication> publications;
private List<Presentation> presentations;
private DataManagementIncident dmi;
Expand Down Expand Up @@ -709,12 +709,12 @@ public void setProgressReportSummary(String progressReportSummary) {
this.progressReportSummary = progressReportSummary;
}

public List<IntellectualProperty> getIntellectualProperty() {
return intellectualProperty;
public List<IntellectualProperty> getIntellectualProperties() {
return intellectualProperties;
}

public void setIntellectualProperty(List<IntellectualProperty> intellectualProperty) {
this.intellectualProperty = intellectualProperty;
public void setIntellectualProperties(List<IntellectualProperty> intellectualProperties) {
this.intellectualProperties = intellectualProperties;
}

public List<Publication> getPublications() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
public record IntellectualProperty(
String type,
String title,
String date,
String assignee,
String patentNumber,
Boolean filingDate,
String filingDate,
String status,
String url,
String contact,
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 @@ -216,4 +216,6 @@
relativeToChangelogFile="true" />
<include file="changesets/changelog-consent-2025-12-05-migrate-ip-presentations-publications.xml"
relativeToChangelogFile="true" />
<include file="changesets/changelog-consent-2025-12-11-rename-intellectual-property-to-properties.xml"
relativeToChangelogFile="true" />
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-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
https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet id="changelog-consent-2025-12-11-rename-intellectual-property-to-properties" author="kevinmarete">
<comment>
Rename intellectualProperty field to intellectualProperties in data_access_request table.
Transforms the singular field name to plural form.
</comment>
<sql>
UPDATE data_access_request
SET data = jsonb_set(
data #- '{intellectualProperty}',
'{intellectualProperties}',
data -> 'intellectualProperty'
)
WHERE parent_id IS NOT NULL
AND data -> 'intellectualProperty' IS NOT NULL
AND data -> 'intellectualProperties' IS NULL;
</sql>
</changeSet>
</databaseChangeLog>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit - could use a newline here.

Original file line number Diff line number Diff line change
Expand Up @@ -901,15 +901,14 @@ private DataAccessRequest generateProgressReport() {
progressReport.getData().setProgressReportSummary("Progress Report Summary");
progressReport
.getData()
.setIntellectualProperty(
.setIntellectualProperties(
List.of(
new IntellectualProperty(
"Patent",
"Description of patent",
"2024-01-01",
"Test Assignee",
"US12345678",
true,
"2024-01-01",
"Active",
"https://example.com",
"[email protected]",
Expand Down
Loading