Skip to content

Commit

Permalink
File name by experiment name instead of project code
Browse files Browse the repository at this point in the history
  • Loading branch information
KochTobi committed Jan 27, 2025
1 parent 6fa682f commit db443c9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,15 @@ private void downloadSampleMetadata() {
var experimentId = context.experimentId().orElseThrow();
var projectCode = projectInformationService.findOverview(projectId)
.map(ProjectOverview::projectCode).orElseThrow();
var experimentName = experimentInformationService.find(projectId.value(), experimentId)
.map(Experiment::getName).orElseThrow();
downloadComponent.trigger(new WorkbookDownloadStreamProvider() {
@Override
public String getFilename() {
return projectCode + "_sample_information.xlsx";
// FIXME unsure what the filename should be projectCode_sample_information.xlsx or experiment_name_sample_information.xlsx
return experimentName.replaceAll(" ", "_") + "_sample_information.xlsx";
// return projectCode + "_sample_information.xlsx";

}

@Override
Expand Down

0 comments on commit db443c9

Please sign in to comment.