diff --git a/expert/field.py b/expert/field.py index 45aa1b1..f744776 100644 --- a/expert/field.py +++ b/expert/field.py @@ -217,6 +217,7 @@ class TrackDateField(Field): fieldType = 'date' part = 'date' format = 'short' + descending = False cssClass = 'right' def getValue(self, row): @@ -239,6 +240,12 @@ class TrackDateField(Field): return '' return timeStamp2ISO(value)[:10] + def getSortValue(self, row): + value = self.getRawValue(row) + if value and self.descending: + return -value + return value or None + class TrackTimeField(TrackDateField): diff --git a/organize/comment/report.py b/organize/comment/report.py index 1641877..99c451e 100644 --- a/organize/comment/report.py +++ b/organize/comment/report.py @@ -34,7 +34,7 @@ class CommentsOverview(ReportConceptView): timeStamp = TrackDateField('timeStamp', u'Timestamp', description=u'The date and time the comment was posted.', - part='dateTime', + part='dateTime', descending=True, executionSteps=['sort', 'output']) target = TargetField('taskId', u'Target', description=u'The resource or concept the comment was posted at.',