Page 1 of 1

Solved - PropertyGroups Metadata Date display error

PostPosted:Thu Nov 01, 2012 12:29 pm
by okmuser
Hi,
I have recently installed OpenKM 6.2 (nightly build) and managed to configure everything from 5.1.11 - apart from MySQL repository.

But when I access custom metadata tab an error pops up relating to the date field.

Can you please guide me to solve this issue.

Re: PropertyGroups Metadata Date display error

PostPosted:Fri Nov 02, 2012 9:29 am
by okmuser
Further information,

From 5.1.11 the exported metadata value is:
Code: Select all
{"name":"okp:datab.date","type":1,"multiValue":false,"value":"2012-09-10T00:00:00.000+10:00","values":[]},
But on 6.2.1 the exported metadata value is:
Code: Select all
{"name":"okp:datab.date","type":"Input","multiValue":false,"value":"20121102000000","values":[]}
I may be wrong but I believe the export and import for date function in custom property values doesn't match, thus the error as per my previous post.

Please help me to overcome this issue.

Thanks with regards,
OkmUser

Re: PropertyGroups Metadata Date display error

PostPosted:Sat Nov 03, 2012 3:17 pm
by jllort
There's a problem between 5.1.11 date format and 6.2 format but can be easilly solved after importing on 6.2

At 5.1.X the date format is String ISO8601_PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZ";
At 6.X the date format is String BASIC_PATTER = "yyyyMMddHHmmss";

Values on version 6.x are stored at table OKM_NODE_PROPERTY:
Code: Select all
SELECT * FROM OKM_NODE_PROPERTY;
Simply build a query to transform older format to newer, for example:
1- replace character "-" to ""
2- replace character : to ""
now you get something like yyyyMMddTHHmmss.SSSZZZ
3 - get first 8 digits yyyyMMdd with digits from 10 to 16 HHmmss
and you'll get the actual format yyyyMMddHHmmss

Re: PropertyGroups Metadata Date display error

PostPosted:Sat Nov 03, 2012 9:03 pm
by okmuser
Thanks, worked like a charm,

cheers

Re: Solved - PropertyGroups Metadata Date display error

PostPosted:Sun Nov 04, 2012 4:35 pm
by jllort
I have added the example in migration guide section.