alfresco-ng2-components icon indicating copy to clipboard operation
alfresco-ng2-components copied to clipboard

Regression in TaskListComponent caused by in-place date formatting

Open yregaieg opened this issue 6 years ago • 0 comments

Type of issue: (check with "[x]")

  • [ ] New feature request
  • [X] Bug
  • [ ] Support request
  • [ ] Documentation

Description

Following an upgrade from ADF-2.5 to ADF 3.0 we have noticed a new change in behavior of the TaskListComponent. We used to use ng-template in order to customize the look and feel of both "Created" and "Ended" columns using our own date formats. That seems to be no longer possible and we are forced to have inconsistent format from this one single task-list page VS the rest of the app. In addition, the new change seems to introduce an even more annoying glitch : When you sort on these fields, the sort is happening in the backend (backend sends over the right page with the right order of elements) and in the frontend (frontend is re-sorting elements based on the new date format, so sorting is done on Month - alphabetic, then day, then year, It could be that the data-table component was also performing this frontend sorting previously, but that wasn't messing with the order when we used to have correct iso8601 date formats). In other words, the frontend is messing up the correct sorting from backend.

I have tracked down the breaking change to the code in : https://github.com/Alfresco/alfresco-ng2-components/blob/bfec78aec92e3b0edc06d8d21e3462ef705bb0af/lib/process-services/task-list/components/task-list.component.ts#L345 introduced in this PR : https://github.com/Alfresco/alfresco-ng2-components/pull/3919

IMHO this change to the tests should have never been done : https://github.com/Alfresco/alfresco-ng2-components/pull/3919/commits/e43adda44d424e079f08a415af1b3de867324daa and if it is really needed to operate at that level to format the dates, then a new attribute should be used in place of overwriting the original value.

yregaieg avatar Feb 21 '19 16:02 yregaieg