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

Added whitespace trimming to uploaded custom metadata TSV files #10696

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

erodde
Copy link
Contributor

@erodde erodde commented Jul 18, 2024

What this PR does / why we need it:
when loading custom metadata blocks using the api/admin/datasetfield/load API, whitespace can be introduced into field names. The change trims whitespace at the beginning and end of all values read into the API before persisting them. I also added a null check for a potential NPE I found during testing.

Which issue(s) this PR closes:

Closes #10688

Special notes for your reviewer:

Suggestions on how to test this:
Load metadata file with whitespace into DV using the API mentioned above.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
no

Is there a release notes update needed for this change?:
I believe not

Additional documentation:

@pdurbin
Copy link
Member

pdurbin commented Jul 18, 2024

@erodde thanks for the pull request! Can you please add a release note snippet? Just a single line is fine. Please see https://guides.dataverse.org/en/6.3/developers/version-control.html#writing-release-note-snippets

@erodde
Copy link
Contributor Author

erodde commented Jul 19, 2024

@erodde thanks for the pull request! Can you please add a release note snippet? Just a single line is fine. Please see https://guides.dataverse.org/en/6.3/developers/version-control.html#writing-release-note-snippets

Done!

@pdurbin
Copy link
Member

pdurbin commented Sep 11, 2024

https://jenkins.dataverse.org/job/IQSS-Dataverse-Develop-PR/job/PR-10696/2/display/redirect said "not found" so I just merged the latest from develop into this PR to kick off a Jenkins run.

@coveralls
Copy link

Coverage Status

coverage: 20.871% (+0.1%) from 20.739%
when pulling 59789b8 on erodde:10688_whitespace_trimming
into 4b96cec on IQSS:develop.

@pdurbin pdurbin added the Size: 3 A percentage of a sprint. 2.1 hours. label Sep 12, 2024
@pdurbin pdurbin added the Type: Feature a feature request label Oct 9, 2024
@cmbz cmbz added the FY25 Sprint 10 FY25 Sprint 10 (2024-11-06 - 2024-11-20) label Nov 7, 2024
@stevenwinship stevenwinship self-assigned this Nov 13, 2024
@stevenwinship stevenwinship removed their assignment Nov 13, 2024
@ofahimIQSS ofahimIQSS self-assigned this Nov 19, 2024
@cmbz cmbz added this to the 6.5 milestone Nov 21, 2024
@ofahimIQSS
Copy link
Contributor

Merging PR - Testing Passed
Testing of 10696.docx

@ofahimIQSS ofahimIQSS merged commit 1b5a1ea into IQSS:develop Dec 3, 2024
11 checks passed
@ofahimIQSS ofahimIQSS removed their assignment Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 10 FY25 Sprint 10 (2024-11-06 - 2024-11-20) Size: 3 A percentage of a sprint. 2.1 hours. Type: Feature a feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trim whitespaces during metadata block TSV file ingest
6 participants