Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field Due_date has wrong format in subpanel (activity, history) #9016

Open
Maratagliullin opened this issue Jan 20, 2021 · 5 comments · May be fixed by #10134
Open

Field Due_date has wrong format in subpanel (activity, history) #9016

Maratagliullin opened this issue Jan 20, 2021 · 5 comments · May be fixed by #10134
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

Comments

@Maratagliullin
Copy link

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

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

  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):
@johnM2401 johnM2401 added 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 labels Jan 22, 2021
@fcorluka
Copy link

fcorluka commented Apr 28, 2021

I see that this is approved, but just for info this is also in 7.10.29 (clean install), 7.10.27, so this is not something new.
EDIT
Files from #8013 are already in my CRM (7.10.29). Only thing that helped (at first) is changing this IF in ListViewSubPanel.php

@timo-ecm2
Copy link

I want to confirm this happens in Version 7.11.22Sugar Version 6.5.25 (Build 344) as well. Go to go demo.suiteondemand.com and follow the steps of Maratagliullin to see this issue in action again.

@SinergiaCRM
Copy link
Contributor

Hi,

I can confirm this in version 7.12.2.

@Maratagliullin. Could you open a Pull Request?

@cyb456
Copy link
Contributor

cyb456 commented Jun 20, 2023

The fixed suggested seems to work for me, how has it been two years and still not added?

Maratagliullin added a commit to Maratagliullin/SuiteCRM that referenced this issue Aug 3, 2023
@Maratagliullin Maratagliullin linked a pull request Aug 3, 2023 that will close this issue
6 tasks
@SuiteBot
Copy link

This issue has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/overwrite-a-class-in-include-or-format-value-in-forhistory-php/91379/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants