DRYD-1837: Term Export Fixes#491
Merged
mikejritter merged 4 commits intocollectionspace:developfrom Jan 27, 2026
Merged
Conversation
mikejritter
commented
Dec 16, 2025
|
|
||
| private CSVPrinter csvPrinter; | ||
| private Map<String, Map<String, Set<String>>> refFieldsByDocType = new HashMap<>(); | ||
| private Map<String, Table<String, String, Set<String>>> refFieldsByDocType = new HashMap<>(); |
Contributor
Author
There was a problem hiding this comment.
Storing the doc type seems unnecessary but I wasn't sure if there could ever be a collision for partNames. It seems unlikely as the export only works on a single docType at a time (though core fields can be exported as well). Maybe it would be worth it though to change.
spirosdi
approved these changes
Jan 9, 2026
Contributor
spirosdi
left a comment
There was a problem hiding this comment.
Tested and confirm that TermRefs are not impacted.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this do?
Why are we doing this? (with JIRA link)
Jira: https://collectionspace.atlassian.net/browse/DRYD-1837
When adding the ability to include the authority type, TermRefs were also impacted because they are under the Vocabulary authority. This however was unexpected behavior from the user side of things as that is generally something which is hidden when interacting with the backend. This updates the CSV export only to continue to treat Terms how they have been previously.
In order to do this I used a Table from guava so that we did not need to maintain a map of map of maps, and instead could use both the part name and Term/Auth keys to put data into buckets. I also created an extra enum to differentiate Term/Auth and Standard fields, and switched from booleans in order to have some more control over what actions to take as just checking if a field was a ref wasn't enough.
How should this be tested? Do these changes have associated tests?
collectionobjects_annotation. I had noticed issues with de-urning when testing but believe it is fixed.Dependencies for merging? Releasing to production?
None
Has the application documentation been updated for these changes?
The export service is undocumented and needs documentation.
Did someone actually run this code to verify it works?
@mikejritter tested using a local install