-
Notifications
You must be signed in to change notification settings - Fork 2
[DT-2527] Fix data collection failure #2763
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b0ba7fc
Add Deserializers
kevinmarete d711595
Add Deserializer Tests
kevinmarete 513297e
Use GsonUtil with deserializers
kevinmarete 0f40cc6
Revert "Use GsonUtil with deserializers"
kevinmarete 18a4060
Revert "Add Deserializer Tests"
kevinmarete c876c56
Revert "Add Deserializers"
kevinmarete 88f1f70
Added changesets
kevinmarete 40de792
Updated swagger
kevinmarete 5469747
Renamed IntellectualProperty methods
kevinmarete dd2dcc9
Combine migration files
kevinmarete 8c57f37
Update local swagger url
kevinmarete File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| type: object | ||
| description: An Author object. | ||
| properties: | ||
| name: | ||
| type: string | ||
| description: The author's name. | ||
| orcId: | ||
| type: string | ||
| description: The author's ORCID identifier. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/main/resources/assets/schemas/IntellectualProperty.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| type: object | ||
| description: An Intellectual Property object. | ||
| properties: | ||
| type: | ||
| type: string | ||
| description: The type of intellectual property. | ||
| title: | ||
| type: string | ||
| description: The title of the intellectual property. | ||
| date: | ||
| type: string | ||
| description: The date associated with the intellectual property. | ||
| assignee: | ||
| type: string | ||
| description: The assignee of the intellectual property. | ||
| patentNumber: | ||
| type: string | ||
| description: The patent number. | ||
| filingDate: | ||
| type: boolean | ||
| description: The filing date indicator. | ||
| status: | ||
| type: string | ||
| description: The status of the intellectual property. | ||
| url: | ||
| type: string | ||
| description: The URL associated with the intellectual property. | ||
| contact: | ||
| type: string | ||
| description: The contact information for the intellectual property. | ||
| ipId: | ||
| type: string | ||
| description: The unique identifier for the intellectual property. | ||
| studyId: | ||
| type: string | ||
| description: The study ID associated with the intellectual property. | ||
| tags: | ||
| type: array | ||
| items: | ||
| type: string | ||
| description: Tags associated with the intellectual property. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| type: object | ||
| description: A Presenter object. | ||
| properties: | ||
| name: | ||
| type: string | ||
| description: The presenter's name. | ||
| email: | ||
| type: string | ||
| description: The presenter's email address. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
...sources/changesets/changelog-consent-2025-12-05-migrate-ip-presentations-publications.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| <?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-05-migrate-intellectual-property-summary" author="kevinmarete"> | ||
| <comment> | ||
| Migrate intellectualPropertySummary to intellectualProperty array format. | ||
| Transforms the summary field into an array with a title object. | ||
| </comment> | ||
| <sql> | ||
| UPDATE data_access_request | ||
| SET data = jsonb_set( | ||
| data #- '{intellectualPropertySummary}', | ||
| '{intellectualProperty}', | ||
| jsonb_build_array( | ||
| jsonb_build_object('title', data -> 'intellectualPropertySummary') | ||
| ) | ||
| ) | ||
| WHERE parent_id IS NOT NULL | ||
| AND data -> 'intellectualPropertySummary' IS NOT NULL | ||
| AND data -> 'ipId' IS NULL; | ||
| </sql> | ||
| </changeSet> | ||
|
|
||
| <changeSet id="changelog-consent-2025-12-05-migrate-presentations-link-to-url" author="kevinmarete"> | ||
| <comment> | ||
| Migrate presentations link field to url field in data_access_request table. | ||
| Removes the link field and sets the url field with the link value. | ||
| </comment> | ||
| <sql> | ||
| UPDATE data_access_request | ||
| SET data = jsonb_set( | ||
| data #- '{presentations,0,link}', | ||
| '{presentations,0,url}', | ||
| data -> 'presentations' -> 0 -> 'link' | ||
| ) | ||
| WHERE parent_id IS NOT NULL | ||
| AND jsonb_typeof(data -> 'presentations') = 'array' | ||
| AND data -> 'presentations' -> 0 -> 'link' IS NOT NULL | ||
| AND data -> 'presentations' -> 0 -> 'url' IS NULL; | ||
| </sql> | ||
| </changeSet> | ||
|
|
||
| <changeSet id="changelog-consent-2025-12-05-migrate-publications-authors-and-dates" author="kevinmarete"> | ||
| <comment> | ||
| Migrate publications authors from string to array format and rename date to publishedDate. | ||
| Splits comma-separated authors into individual author objects. | ||
| </comment> | ||
| <sql splitStatements="false"> | ||
| UPDATE data_access_request | ||
| SET data = jsonb_set( | ||
| data, | ||
| '{publications}', | ||
| ( | ||
| SELECT jsonb_agg( | ||
| CASE | ||
| WHEN jsonb_typeof(pub -> 'authors') = 'string' | ||
| THEN ( | ||
| pub | ||
| || jsonb_build_object( | ||
| 'authors', | ||
| ( | ||
| SELECT jsonb_agg(jsonb_build_object('name', author_name)) | ||
| FROM regexp_split_to_table(pub ->> 'authors', ',') AS author_name | ||
| ) | ||
| ) | ||
| || (CASE WHEN pub -> 'date' IS NOT NULL AND pub -> 'publishedDate' IS NULL | ||
| THEN jsonb_build_object('publishedDate', pub -> 'date') | ||
| ELSE '{}'::jsonb END) | ||
| #- (CASE WHEN pub -> 'date' IS NOT NULL AND pub -> 'publishedDate' IS NULL | ||
| THEN '{date}'::text[] | ||
| ELSE '{}'::text[] END) | ||
| ) | ||
| ELSE pub | ||
| || (CASE WHEN pub -> 'date' IS NOT NULL AND pub -> 'publishedDate' IS NULL | ||
| THEN jsonb_build_object('publishedDate', pub -> 'date') | ||
| ELSE '{}'::jsonb END) | ||
| #- (CASE WHEN pub -> 'date' IS NOT NULL AND pub -> 'publishedDate' IS NULL | ||
| THEN '{date}'::text[] | ||
| ELSE '{}'::text[] END) | ||
| END | ||
| ) | ||
| FROM jsonb_array_elements(data -> 'publications') AS pub | ||
| ) | ||
| ) | ||
| WHERE parent_id IS NOT NULL | ||
| AND jsonb_typeof(data -> 'publications') = 'array' | ||
| AND EXISTS ( | ||
| SELECT 1 FROM jsonb_array_elements(data -> 'publications') AS pub | ||
| WHERE jsonb_typeof(pub -> 'authors') = 'string' | ||
| OR (pub -> 'date' IS NOT NULL AND pub -> 'publishedDate' IS NULL) | ||
| ); | ||
| </sql> | ||
| </changeSet> | ||
| </databaseChangeLog> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.