Bugs in study Date columns in 14.1

LabKey Support Forum (Inactive)
Bugs in study Date columns in 14.1 Anthony Corbett  2014-05-19 11:59
Status: Closed
 
I've found 2 bugs and a major non-backwards compatible schema change introduced in version 14.1 regarding date columns . Updating to this version of labkey will cause major issues for all 20+ studies that our group manages. The following is a summary and attached is a detailed document describing these issues.


1. When upgrading to 14.1 from any prior version on labkey any study dataset field called 'Date' or 'date' is usurped into a "system column" and any metadata originally defined on the field is removed, e.g. required, etc. There is no way to edit metadata on this new "system column" date field and therefore no way to enforce validation on this exiting field that contained existing data. This is NOT backwards compatible with the field definition prior to 14.1 nor is this change mentioned anywhere in the 14.1 release notes. This is like making the word "date" in java a reserved keyword and anyone defining a variable or class named "date" is now out of luck.


2. Per Labkey's developer documentation for pre-defined dataset fields, found here https://www.labkey.org/wiki/home/Documentation/page.view?name=requiredSchemaFields, there is a pre-defined "VisitDate" dataset column defined for datasets that belong to a visit based study. The description of this field is "The date that a visit occurred (only defined in visit-based study datasets)". This seems to lead me to believe that this field should automatically be defined and show up in the "system columns" when creating a new dataset in a visit based study, just like ParticipantId and SequenceNum. However, this is not the case, no such field called "VisitDate" of type DateTime is defined.

3. Moreover, I can define a field called VisitDate and save the dataset definition. In which case, this field then becomes non-editable in that neither the name or datatype can be changed ever again; per Labkey's developer documentation on pre-defined fields it seems that the "VisitDate" user defined column is treated specially. However, against what the documentation states about the datatype of this field, which should be DateTime, I can make it whatever I want (Integer, Number, Text) and the application doesn't error. Then the only way to change the datatype of the VisitDate field once saved is to delete the whole dataset and start over.


Can someone please explain the changes in 14.1 to making any defined field called "date" a system column? As well as how Labkey is interpreting the semantic meaning of the plethora of supposed pre-defined "system columns" date fields:

VisitDate
Created
Date (how is this different than Created Date field or VisitDate field for a visit based study!?)