I have the problem, that the “date due” is not correct formated. It appears in the subpannels history and activities under the contact. The first line with a “date due” is formated like the users preferences. All the other lines are raw like in the database.
Any idea
Could you post a screenshot showing this
I posted some Screenshots. Do you have any idea?
This bug was reported here:
opened 08:29AM - 20 Jan 21 UTC
Type: Bug
Priority:Moderate
Area: Module
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
![date_due](https://user-images.githubusercontent.com/16661881/105146497-1fbd3f80-5b11-11eb-88ad-69124182a02c.png)
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
1. go https://demo.suiteondemand.com/ latest version suitecrm 7.11.18
2. 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):
And the fix was reported here:
salesagility:hotfix
← Maratagliullin:bugfix_9016
opened 12:27PM - 03 Aug 23 UTC
<!--- Please be aware that as of the 31st January 2022 we no longer support 7.10… .x.
New PRs to hotfix-7.10.x will be invalid. If your fix is still applicable to 7.12.x,
please create the pull request to the hotfix branch accordingly. -->
## Description
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.
## Motivation and Context
Fixes https://github.com/salesagility/SuiteCRM/issues/9016
## How To Test This
go https://demo.suiteondemand.com/ latest version suitecrm 7.13.4
Open opportunities and create 3 Task with date due in activity subpanel.
## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to change)
### Final checklist
- [x] My code follows the code style of this project found [here](https://docs.suitecrm.com/community/contributing-code/coding-standards/).
- [ ] My change requires a change to the documentation.
- [x] I have read the [**How to Contribute**](https://docs.suitecrm.com/community/contributing-code/) guidelines.
…and this fix hasn’t received 2 approving reviews yet! Required before they add this fix.