Added check for adding disposition lifecycle aspect.

This commit is contained in:
roxana
2016-10-17 17:50:12 +03:00
parent 531f10c458
commit c827e843ed

View File

@@ -1221,7 +1221,12 @@ public class DispositionServiceImpl extends ServiceBaseImpl
if (newAction == null) if (newAction == null)
{ {
DispositionAction firstDispositionAction = initialiseDispositionAction(record, firstDispositionActionDef, true); NodeRef recordOrFolder = record;
if (!ds.isRecordLevelDisposition())
{
recordOrFolder = folder;
}
DispositionAction firstDispositionAction = initialiseDispositionAction(recordOrFolder, firstDispositionActionDef, true);
newAction = firstDispositionAction.getNodeRef(); newAction = firstDispositionAction.getNodeRef();
newDispositionActionName = (String)nodeService.getProperty(newAction, PROP_DISPOSITION_ACTION_NAME); newDispositionActionName = (String)nodeService.getProperty(newAction, PROP_DISPOSITION_ACTION_NAME);
newDispositionActionDateAsOf = firstDispositionAction.getAsOfDate(); newDispositionActionDateAsOf = firstDispositionAction.getAsOfDate();