Skip to content

Commit a1bc4fd

Browse files
authored
Merge pull request #122 from landreev/IQSS/7956-show_original_file_format
IQSS/7956 show original file format - minor tweaks
2 parents d8e969d + b21131f commit a1bc4fd

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

doc/release-notes/7956-display original file name

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This release changes the display behavior of the file, dataset and collection ("dataverse") pages for tabular files. They will show the original file name and information, and will allow editing of the original file name. The ingested *.tab version is still available from the download menu.
2+

src/main/java/edu/harvard/iq/dataverse/search/IndexServiceBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,7 @@ public SolrInputDocuments toSolrDocs(IndexableDataset indexableDataset, Set<Long
16111611

16121612
String filenameCompleteFinal = "";
16131613
if (fileMetadata != null) {
1614-
String filenameComplete = fileMetadata.getLabel();
1614+
String filenameComplete = fileMetadata.getLabelForOriginal();
16151615
if (filenameComplete != null) {
16161616
String filenameWithoutExtension = "";
16171617
// String extension = "";

src/main/webapp/file.xhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<h:body>
1717
<ui:composition template="/dataverse_template.xhtml">
18-
<ui:param name="pageTitle" value="#{FilePage.fileMetadata.dataFile.displayName} - #{FilePage.file.owner.owner.displayName}"/>
18+
<ui:param name="pageTitle" value="#{FilePage.fileMetadata.labelForOriginal} - #{FilePage.file.owner.owner.displayName}"/>
1919
<ui:param name="dataverse" value="#{FilePage.file.owner.owner}"/>
2020
<ui:param name="showDataverseHeader" value="#{!FilePage.isAnonymizedAccess()}"/>
2121
<ui:param name="showMessagePanel" value="#{true}"/>

src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2220,7 +2220,7 @@ public void testTabularFiles() throws IOException {
22202220
search.prettyPrint();
22212221
search.then().assertThat()
22222222
.statusCode(OK.getStatusCode())
2223-
.body("data.items[0].name", is("data.tab"))
2223+
.body("data.items[0].name", is("data.csv")) // as of 6.11, we are indexing the original names of ingested tab. files
22242224
.body("data.items[0].variables", is(4))
22252225
.body("data.items[0].observations", is(3));
22262226
}

0 commit comments

Comments
 (0)