RM-2026: Unable to complete historical records when mandatory meta-data missing

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.2@99088 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2015-03-10 03:10:49 +00:00
parent e5a8426a0f
commit 79e31a391a
9 changed files with 274 additions and 6 deletions

View File

@@ -54,6 +54,17 @@ public class DeclareRecordAction extends RMActionExecuterAbstractBase
/** Logger */
private static Log logger = LogFactory.getLog(DeclareRecordAction.class);
/** check mandatory properties */
private boolean checkMandatoryPropertiesEnabled = true;
/**
* @param checkMandatoryPropertiesEnabled true if check mandatory properties is enabled, false otherwise
*/
public void setCheckMandatoryPropertiesEnabled(boolean checkMandatoryPropertiesEnabled)
{
this.checkMandatoryPropertiesEnabled = checkMandatoryPropertiesEnabled;
}
/**
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
@@ -69,7 +80,8 @@ public class DeclareRecordAction extends RMActionExecuterAbstractBase
{
List<String> missingProperties = new ArrayList<String>(5);
// Aspect not already defined - check mandatory properties then add
if (mandatoryPropertiesSet(actionedUponNodeRef, missingProperties))
if (!checkMandatoryPropertiesEnabled ||
mandatoryPropertiesSet(actionedUponNodeRef, missingProperties))
{
recordService.disablePropertyEditableCheck();
try