Skip to content

Conversation

@pdurbin
Copy link
Member

@pdurbin pdurbin commented Aug 19, 2025

What this PR does / why we need it:

Makes creation of review datasets possible.

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:

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

Yes, the facets under "Dataset Type" are changing from human readable and translatable ("Dataset" from getDisplayName) to machine-readable ("dataset" from getName). This is to fix #11758 and IQSS/dataverse-frontend#809

Before

Screenshot 2026-02-06 at 11 35 43 AM

After

Screenshot 2026-02-06 at 11 36 00 AM

Note that I'm aware that even after this fix, when you click any of the machine readable names, such as "software", the friendly name will appear above the search results like this:

Screenshot 2026-02-06 at 11 36 30 AM

I left a note in the xhtml about this. I don't think this is worth fixing on the JSF side. In the SPA, the values will consistently be the machine readable versions, such as "software" (lower case).

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

Included

@coveralls
Copy link

coveralls commented Aug 19, 2025

Coverage Status

coverage: 24.334% (-0.02%) from 24.35%
when pulling e65d76d on 11747-review-dataset-type
into 0b78ff8 on develop.

@github-actions

This comment has been minimized.

@pdurbin pdurbin force-pushed the 11747-review-dataset-type branch from dc893bc to 7c629a2 Compare August 26, 2025 14:26
@github-actions

This comment has been minimized.

@cmbz cmbz added the Size: 10 A percentage of a sprint. 7 hours. label Aug 27, 2025
@pdurbin pdurbin moved this from In Progress 💻 to Ready for Review ⏩ in IQSS Dataverse Project Aug 27, 2025
@pdurbin pdurbin removed their assignment Aug 27, 2025
@pdurbin pdurbin marked this pull request as ready for review August 27, 2025 19:08
@jggautier jggautier changed the title add "review" dataset type add "review" dataset type and related metadata blocks Aug 27, 2025
@jggautier
Copy link
Contributor

Next Tuesday I'll add to this PR . properties files for the two metadata blocks

@cmbz cmbz added the FY26 Sprint 5 FY26 Sprint 5 (2025-08-27 - 2025-09-10) label Aug 28, 2025
@jggautier
Copy link
Contributor

I put the two properties files for the metadata blocks into this branch's src/main/java/propertyFiles folder

@github-actions

This comment has been minimized.

@cmbz cmbz added the FY26 Sprint 6 FY26 Sprint 6 (2025-09-10 - 2025-09-24) label Sep 14, 2025
@pdurbin pdurbin force-pushed the 11747-review-dataset-type branch from ef2f080 to db4c453 Compare September 17, 2025 18:08
@github-actions

This comment has been minimized.

@pdurbin pdurbin moved this from Ready for Review ⏩ to In Progress 💻 in IQSS Dataverse Project Sep 17, 2025
@cmbz cmbz added the FY26 Sprint 7 FY26 Sprint 7 (2025-09-24 - 2025-10-08) label Sep 24, 2025
@pdurbin pdurbin force-pushed the 11747-review-dataset-type branch from db4c453 to 44e2c17 Compare September 26, 2025 13:53
@github-actions

This comment has been minimized.

@pdurbin pdurbin force-pushed the 11747-review-dataset-type branch from 44e2c17 to e41d0e3 Compare September 30, 2025 20:07
@github-actions

This comment has been minimized.

@pdurbin pdurbin removed their assignment Feb 9, 2026
@github-actions

This comment has been minimized.

@pdurbin pdurbin changed the title add "review" dataset type and related metadata blocks Review Datasets Feb 10, 2026
Copy link
Contributor

@poikilotherm poikilotherm left a comment

Choose a reason for hiding this comment

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

Here's a first review. Tried to be thorough, might not have captured everything.

.add("availableLicenses", availableLicenses);
}

public String getDisplayName(Locale locale) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it really necessary to duplicate the code for displayName and description?

Copy link
Member Author

Choose a reason for hiding this comment

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

Of course not. I was being lazy, thinking about this:

Screenshot 2026-02-12 at 12 10 31 PM

.add("availableLicenses", availableLicenses);
}

public String getDisplayName(Locale locale) {
Copy link
Contributor

Choose a reason for hiding this comment

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

All the log messages should use lambas to only execute the string concatenations when actually being logged.

Copy link
Member Author

Choose a reason for hiding this comment

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

Where were you when @michbarsinai opened the following issue? 😅

Should we re-open it? 🤔

Copy link
Member Author

@pdurbin pdurbin Feb 12, 2026

Choose a reason for hiding this comment

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

@poikilotherm as an IntelliJ user, you want me to click on one of these?

Screenshot 2026-02-12 at 12 20 31 PM

logger.fine("Locale is English, returning default display name: " + displayName);
return displayName;
}
String propertiesFile = "datasetTypes_" + locale.toLanguageTag() + ".properties";
Copy link
Contributor

Choose a reason for hiding this comment

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

This burns unnecessary CPU cycles every time it's looked up but is only used for a debugging log message.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm happy to change this. What do you suggest?

@@ -5853,7 +5867,7 @@ public Response deleteDatasetType(@Context ContainerRequestContext crc, @PathPar
try {
idToDelete = Long.parseLong(doomed);
Copy link
Contributor

Choose a reason for hiding this comment

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

This method should also allow using a name or an ID, as the other methods. This is especially important now that we return a list of names for allowed types for a collection.

Copy link
Member Author

@pdurbin pdurbin Feb 11, 2026

Choose a reason for hiding this comment

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

Sure, I can add delete by name. When I do, I'll also resolve #11753 (comment)


List<String> invalidDatasetTypes = new ArrayList<>();

String[] allowedDatasetTypeNames = stringValue.split(",");
Copy link
Contributor

@poikilotherm poikilotherm Feb 10, 2026

Choose a reason for hiding this comment

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

Technically, all of this class does things typically located in a service layer. But fine... At least, we should not use a simple comma separated list - a JSON list is much cleaner, as we are using a JSON API and other places like settings etc also support using of JSON Arrays. At some point we really should refactor the API, service and command layer to deal with all of this in a less chaotic way.

Copy link
Member Author

Choose a reason for hiding this comment

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

As I said on the call yesterday (thanks!), I'm a bit weirded out by the idea of passing JSON in a query parameter, but sure, let's keep talking about it.

}
}

if (!invalidDatasetTypes.isEmpty()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It is debatable if the validation of the names should be done in this class or in a separate service layer. As we currently don't have a service layer for DatasetTypes, maybe this one will do. (This is a design flaw of our REST API, which mixes being entry and service layer a lot. As stated above, this whole class mimics a service layer...)

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we're due for another rewrite! 😅

@github-actions

This comment has been minimized.

@pdurbin pdurbin force-pushed the 11747-review-dataset-type branch from c075909 to 8091c45 Compare February 10, 2026 17:28


Also, add note about how "Data Type" (kindOfData) metadata field is used
in resourceType for DataCite exports. See also
datacite/datacite-suggestions#214
@github-actions

This comment has been minimized.

2 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@cmbz cmbz added the FY26 Sprint 17 FY26 Sprint 17 (2026-02-11 - 2026-02-25) label Feb 11, 2026
@pdurbin pdurbin self-assigned this Feb 12, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions
Copy link

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:11747-review-dataset-type
ghcr.io/gdcc/configbaker:11747-review-dataset-type

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 5 FY26 Sprint 5 (2025-08-27 - 2025-09-10) FY26 Sprint 6 FY26 Sprint 6 (2025-09-10 - 2025-09-24) FY26 Sprint 7 FY26 Sprint 7 (2025-09-24 - 2025-10-08) FY26 Sprint 8 FY26 Sprint 8 (2025-10-08 - 2025-10-22) FY26 Sprint 9 FY26 Sprint 9 (2025-10-22 - 2025-11-05) FY26 Sprint 10 FY26 Sprint 10 (2025-11-05 - 2025-11-19) FY26 Sprint 11 FY26 Sprint 11 (2025-11-20 - 2025-12-03) FY26 Sprint 12 FY26 Sprint 12 (2025-12-03 - 2025-12-17) FY26 Sprint 13 FY26 Sprint 13 (2025-12-17 - 2025-12-31) FY26 Sprint 14 FY26 Sprint 14 (2025-12-31 - 2026-01-14) FY26 Sprint 15 FY26 Sprint 15 (2026-01-14 - 2026-01-28) FY26 Sprint 16 FY26 Sprint 16 (2026-01-28 - 2026-02-11) FY26 Sprint 17 FY26 Sprint 17 (2026-02-11 - 2026-02-25) Project: Trusted Data Size: 30 A percentage of a sprint. 21 hours. (formerly size:33)

Projects

Status: Ready for Review ⏩

7 participants