Skip to content

Commit e83a31b

Browse files
authored
Allow "Date" as alias for "Created" column (#6910)
1 parent 4173288 commit e83a31b

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

api/src/org/labkey/api/audit/query/DefaultAuditTypeTable.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,19 @@ protected ColumnInfo resolveColumn(String name)
169169
if (col != null)
170170
return col;
171171

172-
// Handle the old style 'intKey1' and 'key1' columns
173-
String newName = _legacyNameMap.get(FieldKey.fromParts(name));
172+
String newName = null;
173+
174+
if (_legacyNameMap.isEmpty())
175+
{
176+
// Backward compatibility with widely used legacy name
177+
if ("Date".equalsIgnoreCase(name))
178+
newName = "Created";
179+
}
180+
else
181+
{
182+
// Handle the old style 'intKey1' and 'key1' columns
183+
newName = _legacyNameMap.get(FieldKey.fromParts(name));
184+
}
174185
col = super.resolveColumn(newName);
175186
if (col != null)
176187
{

0 commit comments

Comments
 (0)