mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-1099 (Refactor Transfer and Accession reports)
* Bug fixing git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@58601 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -813,8 +813,15 @@ public class RecordServiceImpl implements RecordService,
|
||||
writer.putContent(reader);
|
||||
}
|
||||
|
||||
// make record
|
||||
makeRecord(record);
|
||||
// Check if the "record" aspect has been applied already.
|
||||
// In case of filing a report the created node will be made
|
||||
// a record within the "onCreateChildAssociation" method if
|
||||
// a destination for the report has been selected.
|
||||
if (nodeService.hasAspect(record, ASPECT_RECORD) == false)
|
||||
{
|
||||
// make record
|
||||
makeRecord(record);
|
||||
}
|
||||
|
||||
return record;
|
||||
}
|
||||
|
@@ -22,10 +22,12 @@ import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.report.Report;
|
||||
import org.alfresco.module.org_alfresco_module_rm.report.ReportModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.report.ReportService;
|
||||
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
@@ -74,7 +76,10 @@ public abstract class BaseReportAction extends RMActionExecuterAbstractBase impl
|
||||
Report report = reportService.generateReport(reportType, actionedUponNodeRef, MimetypeMap.MIMETYPE_HTML, addProperties(actionedUponNodeRef));
|
||||
|
||||
NodeRef destination = getDestination(action);
|
||||
reportService.fileReport(destination, report);
|
||||
NodeRef filedReport = reportService.fileReport(destination, report);
|
||||
|
||||
String filedReportName = (String) nodeService.getProperty(filedReport, ContentModel.PROP_NAME);
|
||||
action.setParameterValue(ActionExecuterAbstractBase.PARAM_RESULT, filedReportName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user