Skip to content

feat: add "string" type for metadata fields#11321

Merged
ofahimIQSS merged 5 commits intoIQSS:developfrom
nfdi4health:feat/11147
Mar 31, 2025
Merged

feat: add "string" type for metadata fields#11321
ofahimIQSS merged 5 commits intoIQSS:developfrom
nfdi4health:feat/11147

Conversation

@vera
Copy link
Copy Markdown
Contributor

@vera vera commented Mar 10, 2025

What this PR does / why we need it:

See #11147

Which issue(s) this PR closes:

Special notes for your reviewer:

/

Suggestions on how to test this:

  1. Load a metadata block TSV that defines a field with type "string"

    example: https://gist.github.com/vera/fc39e7b0bb0e9da7dc24a41c680f6d59

    curl http://localhost:8080/api/admin/datasetfield/load -H "Content-type: text/tab-separated-values" -X POST --upload-file stringtest.tsv

  2. Activate metadata block

    curl curl -H "X-Dataverse-key:$API_TOKEN" -X POST -H "Content-type:application/json" -d "[\"citation\", \"stringTest\"]" http://localhost:8080/api/dataverses/:root/metadatablocks

  3. Update Solr schema

    curl "http://localhost:8080/api/admin/index/solr/schema" | ./update-fields.sh schema.xml

    docker cp schema.xml solr-1:/var/solr/data/collection1/conf/schema.xml

    curl "http://localhost:8983/solr/admin/cores?action=RELOAD&core=collection1"

  4. Confirm that the updated Solr schema contains a new field with type "string"

     <field name="testStringField" type="string" multiValued="false" stored="true" indexed="true"/>
    ...
     <copyField source="testStringField" dest="_text_" maxChars="3000"/>
    
  5. Create a new dataset via the UI (or API)

    image

  6. Verify the string value correctly ends up in Solr and can be seen on the dataset page

    image

    image

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

/

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

Yes, I think that would be good. I've added a release note as part of this PR.

Additional documentation:

/

@pdurbin pdurbin moved this to Ready for Triage in IQSS Dataverse Project Mar 10, 2025
@ofahimIQSS ofahimIQSS added the Size: 10 A percentage of a sprint. 7 hours. label Mar 11, 2025
@ofahimIQSS ofahimIQSS moved this from Ready for Triage to Ready for Review ⏩ in IQSS Dataverse Project Mar 11, 2025
@cmbz cmbz added FY25 Sprint 19 FY25 Sprint 19 (2025-03-12 - 2025-03-26) FY25 Sprint 18 FY25 Sprint 18 (2025-02-26 - 2025-03-12) labels Mar 12, 2025
@stevenwinship stevenwinship self-assigned this Mar 12, 2025
@stevenwinship stevenwinship moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Mar 12, 2025
@github-project-automation github-project-automation Bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Mar 12, 2025
@stevenwinship stevenwinship removed their assignment Mar 12, 2025
@ofahimIQSS ofahimIQSS self-assigned this Mar 26, 2025
@ofahimIQSS ofahimIQSS moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Mar 26, 2025
@ofahimIQSS
Copy link
Copy Markdown
Contributor

Could you please update this PR with the latest from Develop? Need pom.xml to show 6.6. Thanks!

@pdurbin
Copy link
Copy Markdown
Member

pdurbin commented Mar 26, 2025

@vera or @johannes-darms will have to do it. I tried but I don't have permission. 😅

% git push
ERROR: Permission to nfdi4health/dataverse.git denied to pdurbin.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

@vera
Copy link
Copy Markdown
Contributor Author

vera commented Mar 27, 2025

Done!

Apparently, the option "Allow edits by maintainers" isn't available for PRs made from forks owned by organizations, so that's why you couldn't push @pdurbin ... Too bad (but a request to change that is open here: https://github.com/orgs/community/discussions/5634)

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 22.729% (+0.001%) from 22.728%
when pulling d32b771 on nfdi4health:feat/11147
into c4f3d76 on IQSS:develop.

@pdurbin
Copy link
Copy Markdown
Member

pdurbin commented Mar 27, 2025

@vera thanks, I bookmarked that request.

Thanks also for merging the latest from develop!

@cmbz cmbz added the FY25 Sprint 20 FY25 Sprint 20 (2025-03-26 - 2025-04-09) label Mar 30, 2025
@ofahimIQSS ofahimIQSS self-assigned this Mar 31, 2025
@ofahimIQSS
Copy link
Copy Markdown
Contributor

looks good from my end.
image

@ofahimIQSS ofahimIQSS merged commit 86176f5 into IQSS:develop Mar 31, 2025
17 checks passed
@github-project-automation github-project-automation Bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Mar 31, 2025
@ofahimIQSS ofahimIQSS removed their assignment Mar 31, 2025
@pdurbin pdurbin added this to the 6.7 milestone Mar 31, 2025
@scolapasta scolapasta moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Apr 1, 2025
@vera vera deleted the feat/11147 branch September 29, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY25 Sprint 18 FY25 Sprint 18 (2025-02-26 - 2025-03-12) FY25 Sprint 19 FY25 Sprint 19 (2025-03-12 - 2025-03-26) FY25 Sprint 20 FY25 Sprint 20 (2025-03-26 - 2025-04-09) Size: 10 A percentage of a sprint. 7 hours.

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

Feature Request: Add "string" type for metadata fields

8 participants