SuiteCRM
SuiteCRM copied to clipboard
Field Due_date has wrong format in subpanel (activity, history)
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 https://github.com/salesagility/SuiteCRM/pull/8013 Works for me.
Steps to Reproduce
- go https://demo.suiteondemand.com/ latest version suitecrm 7.11.18
- Open opportunities and create 3 Task with date due in activity subpanel.
Your Environment
- SuiteCRM Version used: 7.11.18
- Browser name and version (e.g. Chrome Version 87.0.4280.141 (64-bit)):
- Environment name and version (e.g. MySQL, PHP 7.3):
- Operating System and version (e.g Ubuntu 16.04):