Skip to content

Commit

Permalink
tweaks to ingest notification emails #8096
Browse files Browse the repository at this point in the history
- Only list files that failed ingest.
- Remove "(Error)" from next to file name.
- Change "file(s)" to "files".
- Remove "Dataverse" to avoid having to say "Dataverse Software".
  • Loading branch information
pdurbin committed Dec 14, 2021
1 parent 726a7e7 commit e647c0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,13 @@ public void onMessage(Message message) {
if (ingestService.ingestAsTabular(datafile_id)) {
//Thread.sleep(10000);
logger.fine("Finished ingest job;");
sbIngestedFiles.append(String.format("<li>%s</li>", datafile.getCurrentName()));
// We used to list the successfully ingested files in the "success"
// and "mixed success and failure" emails. Now we never list successfully
// ingested files so this line is commented out.
// sbIngestedFiles.append(String.format("<li>%s</li>", datafile.getCurrentName()));
} else {
logger.warning("Error occurred during ingest job for file id " + datafile_id + "!");
sbIngestedFiles.append(String.format("<li>%s (" + BundleUtil.getStringFromBundle("messages.error") + ")</li>", datafile.getCurrentName()));
sbIngestedFiles.append(String.format("<li>%s</li>", datafile.getCurrentName()));
ingestWithErrors = true;
}

Expand All @@ -119,7 +122,7 @@ public void onMessage(Message message) {

ingestWithErrors = true;

sbIngestedFiles.append(String.format("<li>%s (" + BundleUtil.getStringFromBundle("messages.error") + ")</li>", datafile.getCurrentName()));
sbIngestedFiles.append(String.format("<li>%s</li>", datafile.getCurrentName()));

datafile.SetIngestProblem();
IngestReport errorReport = new IngestReport();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/propertyFiles/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ notification.access.revoked.dataverse=You have been removed from a role in {0}.
notification.access.revoked.dataset=You have been removed from a role in {0}.
notification.access.revoked.datafile=You have been removed from a role in {0}.
notification.checksumfail=One or more files in your upload failed checksum validation for dataset <a href="/dataset.xhtml?persistentId={0}" title="{1}">{1}</a>. Please re-run the upload script. If the problem persists, please contact support.
notification.ingest.completed=Your Dataset <a href="{0}/dataset.xhtml?persistentId={1}" title="{2}">{2}</a> has one or more tabular files that completed the <a href="{3}/{4}/user/dataset-management.html#tabular-data-files" title="Tabular Data Files - Dataverse User Guide" target="_blank" rel="noopener">tabular ingest process</a>. These file(s) are available for download in multiple formats for enhanced archival purposes. The file type extensions of ingested files have been changed to ".tab". Files are available to download in original or archival format. Please see the <a href="{3}/{4}/user/dataset-management.html#tabular-data-files" title="Tabular Data Files - Dataverse User Guide" target="_blank" rel="noopener">guides for more information about ingest</a> and Dataverse support for tabular files.<br><br>File(s) with completed ingest:{5}
notification.ingest.completedwitherrors=Your Dataset <a href="{0}/dataset.xhtml?persistentId={1}" title="{2}">{2}</a> has one or more tabular files that are available but not supported for <a href="{3}/{4}/user/dataset-management.html#tabular-data-files" title="Tabular Data Files - Dataverse User Guide" target="_blank" rel="noopener">tabular ingest</a>. These file(s) are available for download, but do not have additional archival features. Please see the <a href="{3}/{4}/user/dataset-management.html#tabular-data-files" title="Tabular Data Files - Dataverse User Guide" target="_blank" rel="noopener">guides for more information about ingest</a> and Dataverse support for tabular files.<br><br>File(s) for which ingest was attempted:{5}
notification.ingest.completed=Your Dataset <a href="{0}/dataset.xhtml?persistentId={1}" title="{2}">{2}</a> has one or more tabular files that completed the <a href="{3}/{4}/user/dataset-management.html#tabular-data-files" title="Tabular Data Files - Dataverse User Guide" target="_blank" rel="noopener">tabular ingest process</a>. These files are available for download in multiple formats for enhanced archival purposes. The file type extensions of ingested files have been changed to ".tab". Files are available to download in original or archival format. Please see the <a href="{3}/{4}/user/dataset-management.html#tabular-data-files" title="Tabular Data Files - Dataverse User Guide" target="_blank" rel="noopener">guides for more information about ingest</a> and support for tabular files.
notification.ingest.completedwitherrors=Your Dataset <a href="{0}/dataset.xhtml?persistentId={1}" title="{2}">{2}</a> has one or more tabular files that are available but not supported for <a href="{3}/{4}/user/dataset-management.html#tabular-data-files" title="Tabular Data Files - Dataverse User Guide" target="_blank" rel="noopener">tabular ingest</a>. These files are available for download, but do not have additional archival features. Please see the <a href="{3}/{4}/user/dataset-management.html#tabular-data-files" title="Tabular Data Files - Dataverse User Guide" target="_blank" rel="noopener">guides for more information about ingest</a> and support for tabular files.<br><br>Files with incomplete ingest:{5}
notification.mail.import.filesystem=Dataset {2} ({0}/dataset.xhtml?persistentId={1}) has been successfully uploaded and verified.
notification.import.filesystem=Dataset <a href="/dataset.xhtml?persistentId={0}" title="{1}">{1}</a> has been successfully uploaded and verified.
notification.import.checksum=<a href="/dataset.xhtml?persistentId={0}" title="{1}">{1}</a>, dataset had file checksums added via a batch job.
Expand Down

0 comments on commit e647c0b

Please sign in to comment.