Field Due_date has wrong format in subpanel (activity, history) #9016
Labels
Area: Module
Issues & PRs related to modules that do not have specific label
Priority:Moderate
Issues & PRs that are minor; broken styling, cosmetic, warnings - there are practical workarounds
Type: Bug
Bugs within the core SuiteCRM codebase
Due dates are not formatted correctly in the subpanels history and activity in the Opportunities module, I suppose this is a general problem is not related only to Opportunities but related aliases in fields.
Issue
In subpanel history in the Opportunities date due field has wrong format:
Task 1, date_due - 01/15/2021 11:00 (only first row is correct)
Task 2, date_due - 2021-01-16 11:00:00 (date don't match to the format on locale settings)
Task 3, date_due - 2021-01-18 11:00:00 (date don't match to the format on locale settings)
Direct link on demo site:
https://demo.suiteondemand.com/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DOpportunities%26offset%3D3%26stamp%3D1611125174035356000%26return_module%3DOpportunities%26action%3DDetailView%26record%3Dd9c1739a-dd27-5454-1c82-5fb7d8775eff
Expected Behavior
Correct date formatting and working sorting.
Actual Behavior
Screenshot on dropbox:
https://www.dropbox.com/s/ep4ta1axp4mzhmo/date_due.png?dl=0
Possible Fix
On file include/ListView/ListViewSubPanel.php (424 row)
Сondition:
if (!isset($fields[strtoupper($list_field['alias'])]) || empty($fields[strtoupper($list_field['alias'])])) {
...
Сhanged to:
if (isset($fields[strtoupper($list_field['alias'])]) || empty($fields[strtoupper($list_field['alias'])])) {
....
Works for me.
Also sorting is not working by date_due field.
I found solution in #8013
Works for me.
Steps to Reproduce
Your Environment
The text was updated successfully, but these errors were encountered: