Skip to content

Closes #3287 Change zip file name for bulk downloads#3288

Merged
lbownik merged 4 commits into
developfrom
3287_Change_zip_file_name_for_bulk_downloads
May 15, 2026
Merged

Closes #3287 Change zip file name for bulk downloads#3288
lbownik merged 4 commits into
developfrom
3287_Change_zip_file_name_for_bulk_downloads

Conversation

@lbownik
Copy link
Copy Markdown
Contributor

@lbownik lbownik commented May 12, 2026

No description provided.

@lbownik lbownik requested a review from rscipien May 12, 2026 13:02

private String createFileName(final String authorName, final Timestamp datasetCreationTime) {

final String publicationYear = new SimpleDateFormat("YYY").format(datasetCreationTime);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Format probably should have 4YYYY

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Dataset dataset = findDatasetOrDie(datasetId);
publicationTime = dataset.getCreateDate();
DatasetVersion datasetVersion = getDatasetVersionOrDie(dataverseRequest, versionId, dataset);
author = datasetVersion.getDatasetAuthors().get(0).getName().getRawValue();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe if would be better to use stream and findFirst?

author = datasetVersion.getDatasetAuthors()
    .stream()
    .findFirst()
    .map(author -> author.getName().getRawValue())
    .orElse("Unknown");

@rscipien rscipien assigned lbownik and unassigned rscipien May 15, 2026
@lbownik lbownik force-pushed the 3287_Change_zip_file_name_for_bulk_downloads branch from 263488a to 1b1b789 Compare May 15, 2026 09:03
@lbownik lbownik merged commit ea02e37 into develop May 15, 2026
1 check passed
@lbownik lbownik deleted the 3287_Change_zip_file_name_for_bulk_downloads branch May 15, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants