Merge branch 'feature-2.4/RM-3060' into 'release/V2.4'

Feature 2.4/rm 3060 - Record linked to folder with the same disposition schedule couldn't be cut off

Added search by name for current disposition action; when the record has multiple disposition schedules the current disposition action may not be found by id.

See merge request !157

(cherry picked from commit d9883a3b02)
This commit is contained in:
Roxana Lucanu-Ghetu
2016-06-17 08:25:27 +01:00
committed by roxana
parent 8470ed38f8
commit 80c64b59eb
4 changed files with 159 additions and 0 deletions

View File

@@ -38,6 +38,9 @@ public class EditDispositionActionAsOfDateAction extends RMActionExecuterAbstrac
private static final String MSG_VALID_DATE_DISP_ASOF = "rm.action.valid-date-disp-asof";
private static final String MSG_DISP_ASOF_LIFECYCLE_APPLIED = "rm.action.disp-asof-lifecycle-applied";
/** Action name */
public static final String NAME = "editDispositionActionAsOfDate";
/** Action parameters */
public static final String PARAM_AS_OF_DATE = "asOfDate";

View File

@@ -880,6 +880,13 @@ public class DispositionServiceImpl extends ServiceBaseImpl
// Get the current action
String currentADId = (String) nodeService.getProperty(currentDispositionAction, PROP_DISPOSITION_ACTION_ID);
currentDispositionActionDefinition = di.getDispositionActionDefinition(currentADId);
// When the record has multiple disposition schedules the current disposition action may not be found by id
// In this case it will be searched by name
if(currentDispositionActionDefinition == null)
{
String currentADName = (String) nodeService.getProperty(currentDispositionAction, PROP_DISPOSITION_ACTION);
currentDispositionActionDefinition = di.getDispositionActionDefinitionByName(currentADName);
}
// Get the next disposition action
int index = currentDispositionActionDefinition.getIndex();