mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge feature-2.3/RM-3386_ManuallySetDate into release/V2.3.
This commit is contained in:
@@ -392,6 +392,11 @@
|
|||||||
<type>d:date</type>
|
<type>d:date</type>
|
||||||
<mandatory>false</mandatory>
|
<mandatory>false</mandatory>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="rma:manuallySetAsOf">
|
||||||
|
<title>Manually Set Disposition Date Flag</title>
|
||||||
|
<type>d:boolean</type>
|
||||||
|
<default>false</default>
|
||||||
|
</property>
|
||||||
<property name="rma:dispositionEventsEligible">
|
<property name="rma:dispositionEventsEligible">
|
||||||
<title>Disposition Events Eligible</title>
|
<title>Disposition Events Eligible</title>
|
||||||
<type>d:boolean</type>
|
<type>d:boolean</type>
|
||||||
|
@@ -18,6 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||||
|
|
||||||
|
import static org.apache.commons.lang3.BooleanUtils.isNotTrue;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -185,7 +187,8 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
|
|||||||
{
|
{
|
||||||
// the change does effect the nextAction for this node
|
// the change does effect the nextAction for this node
|
||||||
// so go ahead and determine what needs updating
|
// so go ahead and determine what needs updating
|
||||||
if (changedProps.contains(PROP_DISPOSITION_PERIOD))
|
if (changedProps.contains(PROP_DISPOSITION_PERIOD)
|
||||||
|
&& isNotTrue((Boolean) getNodeService().getProperty(nextAction.getNodeRef(), PROP_MANUALLY_SET_AS_OF)))
|
||||||
{
|
{
|
||||||
persistPeriodChanges(dispositionActionDef, nextAction);
|
persistPeriodChanges(dispositionActionDef, nextAction);
|
||||||
}
|
}
|
||||||
|
@@ -65,6 +65,7 @@ public class EditDispositionActionAsOfDateAction extends RMActionExecuterAbstrac
|
|||||||
if (da != null)
|
if (da != null)
|
||||||
{
|
{
|
||||||
getNodeService().setProperty(da.getNodeRef(), PROP_DISPOSITION_AS_OF, asOfDate);
|
getNodeService().setProperty(da.getNodeRef(), PROP_DISPOSITION_AS_OF, asOfDate);
|
||||||
|
getNodeService().setProperty(da.getNodeRef(), PROP_MANUALLY_SET_AS_OF, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -18,6 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.module.org_alfresco_module_rm.disposition.property;
|
package org.alfresco.module.org_alfresco_module_rm.disposition.property;
|
||||||
|
|
||||||
|
import static org.apache.commons.lang3.BooleanUtils.isNotTrue;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -211,7 +213,11 @@ public class DispositionProperty extends BaseBehaviourBean
|
|||||||
|
|
||||||
// update asOf date on the disposition action based on the new property value
|
// update asOf date on the disposition action based on the new property value
|
||||||
NodeRef daNodeRef = dispositionAction.getNodeRef();
|
NodeRef daNodeRef = dispositionAction.getNodeRef();
|
||||||
nodeService.setProperty(daNodeRef, PROP_DISPOSITION_AS_OF, updatedAsOf);
|
// Don't overwrite a manually set "disposition as of" date.
|
||||||
|
if (isNotTrue((Boolean) nodeService.getProperty(daNodeRef, PROP_MANUALLY_SET_AS_OF)))
|
||||||
|
{
|
||||||
|
nodeService.setProperty(daNodeRef, PROP_DISPOSITION_AS_OF, updatedAsOf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -149,6 +149,8 @@ public interface RecordsManagementModel extends RecordsManagementCustomModel
|
|||||||
QName PROP_DISPOSITION_ACTION_ID = QName.createQName(RM_URI, "dispositionActionId");
|
QName PROP_DISPOSITION_ACTION_ID = QName.createQName(RM_URI, "dispositionActionId");
|
||||||
QName PROP_DISPOSITION_ACTION = QName.createQName(RM_URI, "dispositionAction");
|
QName PROP_DISPOSITION_ACTION = QName.createQName(RM_URI, "dispositionAction");
|
||||||
QName PROP_DISPOSITION_AS_OF = QName.createQName(RM_URI, "dispositionAsOf");
|
QName PROP_DISPOSITION_AS_OF = QName.createQName(RM_URI, "dispositionAsOf");
|
||||||
|
/** A flag indicating that the "disposition as of" date has been manually set and shouldn't be changed. */
|
||||||
|
QName PROP_MANUALLY_SET_AS_OF = QName.createQName(RM_URI, "manuallySetAsOf");
|
||||||
QName PROP_DISPOSITION_EVENTS_ELIGIBLE = QName.createQName(RM_URI, "dispositionEventsEligible");
|
QName PROP_DISPOSITION_EVENTS_ELIGIBLE = QName.createQName(RM_URI, "dispositionEventsEligible");
|
||||||
QName PROP_DISPOSITION_ACTION_STARTED_AT = QName.createQName(RM_URI, "dispositionActionStartedAt");
|
QName PROP_DISPOSITION_ACTION_STARTED_AT = QName.createQName(RM_URI, "dispositionActionStartedAt");
|
||||||
QName PROP_DISPOSITION_ACTION_STARTED_BY = QName.createQName(RM_URI, "dispositionActionStartedBy");
|
QName PROP_DISPOSITION_ACTION_STARTED_BY = QName.createQName(RM_URI, "dispositionActionStartedBy");
|
||||||
|
Reference in New Issue
Block a user