In DashboardLibrary.cql, we group resources together, and then sort them by the date field associated with the Tuple for each resource. However, this date is a string value, not a date value. Moreover, the string value can follow different formats for different instances of a resource, for example when the strings are different lengths (ex. YYYY-MM vs YYYY-MM-DD). Or where the word "to" is included in the string you are sorting with, to concatenate the start and end date strings (end date may not always be present).
Investigate the way we sort by date, make any updates that are needed, and add testing to show that the resource instances can be properly sorted by date for each resource type.
See https://github.com/ccsm-cds-tools/ccsm-cds-with-tests/pull/23#discussion_r918222259
In DashboardLibrary.cql, we group resources together, and then sort them by the date field associated with the Tuple for each resource. However, this date is a string value, not a date value. Moreover, the string value can follow different formats for different instances of a resource, for example when the strings are different lengths (ex. YYYY-MM vs YYYY-MM-DD). Or where the word "to" is included in the string you are sorting with, to concatenate the start and end date strings (end date may not always be present).
Investigate the way we sort by date, make any updates that are needed, and add testing to show that the resource instances can be properly sorted by date for each resource type.