AnsweredAssumed Answered

Empty d:date fields & 'Bulk Filesystem Import Tool'...

Question asked by oofdachile on Sep 24, 2013
Latest reply on Sep 25, 2013 by oofdachile
Hi, folks –

I'm trying to import content using the 4.2.d "Bulk Filesystem Import Tool", but I'm having problems importing content whose corresponding metadata files contain empty values in non-mandatory metadata fields of d:date field type.  Alfresco Community 4.2.d complains that it doesn't understand how to translate these (empty) string values into dates:

org.alfresco.error.AlfrescoRuntimeException: 08230051 org.alfresco.service.cmr.repository.datatype.TypeConversionException: The property value is not compatible with the type defined for the property:
   property: Name: {}SignatureDate
Title: Signature Date
Description: null
Default Value: null
DataType Name: {}date
ContainerClass Name: {}ConsentForm
isMultiValued: false
isMandatory: false
isMandatoryEnforced: false
isProtected: false
isIndexed: true
isStoredInIndex: false
isIndexedAtomically: true
indexTokenisationMode: TRUE

   value type: class java.lang.String
   at org.alfresco.repo.domain.node.NodePropertyHelper.makeNodePropertyValue(
   at org.alfresco.repo.domain.node.NodePropertyHelper.addValueToPersistedProperties(
   at org.alfresco.repo.domain.node.NodePropertyHelper.convertToPersistentProperties(

The entry for this field in the content item's corresponding metadata file is:

<entry key="mssT002:SignatureDate"></entry>

… and the field is defined in my metadata model as:

<property name="mssT002:SignatureDate">
   <title>Signature Date</title>

If I plug in a value for this field in ISO 8601 format (with timezone offset) like this:

<entry key="mssT002:SignatureDate">2012-02-23T12:42:00.111-05:00</entry>

… as described here …

… near the end of Peter's blog post, then the import works swimmingly – though of course I had to supply a value for an item whose non-mandatory field did not have a value.  (And after the import, I can click the "none" button when editing value of this field in the properties of the imported item via Alfresco Explorer:  Alfresco accepts this field as non-mandatory.)

Oh ye of great experience, what suggestions do you have to share regarding importing items with empty, non-mandatory d:date metadata field values?