diff --git a/source/java/org/alfresco/repo/forms/processor/workflow/TypedPropertyValueGetter.java b/source/java/org/alfresco/repo/forms/processor/workflow/TypedPropertyValueGetter.java index ac31a647b4..37a1f30f5b 100644 --- a/source/java/org/alfresco/repo/forms/processor/workflow/TypedPropertyValueGetter.java +++ b/source/java/org/alfresco/repo/forms/processor/workflow/TypedPropertyValueGetter.java @@ -23,11 +23,13 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.TimeZone; import org.alfresco.repo.forms.FormException; import org.alfresco.service.cmr.dictionary.DataTypeDefinition; import org.alfresco.service.cmr.dictionary.PropertyDefinition; import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter; +import org.alfresco.util.ISO8601DateFormat; import org.json.JSONArray; import org.json.JSONException; import org.springframework.extensions.surf.util.I18NUtil; @@ -64,6 +66,11 @@ public class TypedPropertyValueGetter { return processLocaleValue(value); } + else if(isDateProperty(propDef) && value instanceof String && !ISO8601DateFormat.isTimeComponentDefined((String) value)) + { + // Special handling for day-only date storage (ALF-10243) + return ISO8601DateFormat.parseDayOnly((String) value, TimeZone.getDefault()); + } else if (value instanceof String) { String valStr = (String) value; @@ -119,6 +126,11 @@ public class TypedPropertyValueGetter { return propDef.getDataType().getName().equals(DataTypeDefinition.BOOLEAN); } + + private boolean isDateProperty(PropertyDefinition propDef) + { + return propDef.getDataType().getName().equals(DataTypeDefinition.DATE); + } private Serializable processLocaleValue(Object value) {