mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-1532, fixed submission date comparison for some dates on edit metadata of completed pictures
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@75196 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -562,8 +562,17 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
|||||||
boolean propertyUnchanged = false;
|
boolean propertyUnchanged = false;
|
||||||
if (beforeValue instanceof Date && afterValue instanceof Date)
|
if (beforeValue instanceof Date && afterValue instanceof Date)
|
||||||
{
|
{
|
||||||
// deal with date values
|
// deal with date values, remove the seconds and milliseconds for the
|
||||||
propertyUnchanged = (((Date)beforeValue).compareTo((Date)afterValue) == 0);
|
// comparison as they are removed from the submitted for data
|
||||||
|
Calendar beforeCal = Calendar.getInstance();
|
||||||
|
beforeCal.setTime((Date)beforeValue);
|
||||||
|
Calendar afterCal = Calendar.getInstance();
|
||||||
|
afterCal.setTime((Date)afterValue);
|
||||||
|
beforeCal.set(Calendar.SECOND, 0);
|
||||||
|
beforeCal.set(Calendar.MILLISECOND, 0);
|
||||||
|
afterCal.set(Calendar.SECOND, 0);
|
||||||
|
afterCal.set(Calendar.MILLISECOND, 0);
|
||||||
|
propertyUnchanged = (beforeCal.compareTo(afterCal) == 0);
|
||||||
}
|
}
|
||||||
else if ((afterValue instanceof Boolean) && (beforeValue == null) && (afterValue == Boolean.FALSE))
|
else if ((afterValue instanceof Boolean) && (beforeValue == null) && (afterValue == Boolean.FALSE))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user