Pull request #565: RED-5049 - Allow reports to be downloaded in all document states
Merge in RED/persistence-service from feature/RED-5049-1 to master * commit '50f89016d29e0f757885cf1fd1d4f79a6cff4b7f': RED-5049 - Allow reports to be downloaded in all document states
This commit is contained in:
commit
d689acf5b8
@ -249,7 +249,9 @@ public class DownloadPreparationService {
|
|||||||
private String createFileName(FileEntity fileStatus, ReportTemplateEntity reportTemplate) {
|
private String createFileName(FileEntity fileStatus, ReportTemplateEntity reportTemplate) {
|
||||||
|
|
||||||
if (fileStatus != null) {
|
if (fileStatus != null) {
|
||||||
return removeExtension(fileStatus.getFilename()) + getExtension(reportTemplate.getFileName());
|
var isFileApproved = WorkflowStatus.APPROVED.equals(fileStatus.getWorkflowStatus());
|
||||||
|
String filename = isFileApproved ? fileStatus.getFilename() : "UNAPPROVED_" + fileStatus.getFilename();
|
||||||
|
return removeExtension(filename) + getExtension(reportTemplate.getFileName());
|
||||||
} else {
|
} else {
|
||||||
return reportTemplate.getFileName();
|
return reportTemplate.getFileName();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user