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: {http://www.mayoclinic.org/mss/Test/1.0}SignatureDate
Title: Signature Date
Description: null
Default Value: null
DataType Name: {http://www.alfresco.org/model/dictionary/1.0}date
ContainerClass Name: {http://www.mayoclinic.org/mss/Test/1.0}ConsentForm
isMultiValued: false
isMandatory: false
isMandatoryEnforced: false
isProtected: false
isIndexed: true
isStoredInIndex: false
isIndexedAtomically: true
indexTokenisationMode: TRUE
value:
value type: class java.lang.String
at org.alfresco.repo.domain.node.NodePropertyHelper.makeNodePropertyValue(NodePropertyHelper.java:323)
at org.alfresco.repo.domain.node.NodePropertyHelper.addValueToPersistedProperties(NodePropertyHelper.java:276)
at org.alfresco.repo.domain.node.NodePropertyHelper.convertToPersistentProperties(NodePropertyHelper.java:97)
[…]
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>
<type>d:date</type>
</property>
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 …http://blogs.alfresco.com/wp/pmonks/2009/10/22/bulk-import-from-a-filesystem/… 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?Thanks!Don