RED-5049 - Allow reports to be downloaded in all document states
- add prefix UNAPPROVED for reports file also
This commit is contained in:
parent
f414ef33ff
commit
50f89016d2
@ -249,7 +249,9 @@ public class DownloadPreparationService {
|
||||
private String createFileName(FileEntity fileStatus, ReportTemplateEntity reportTemplate) {
|
||||
|
||||
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 {
|
||||
return reportTemplate.getFileName();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user