Suitecrm: AOR_Reports Date issues

Created on 5 Apr 2018  路  14Comments  路  Source: salesagility/SuiteCRM



Issue

There are still some serious issues with the date in the AOR_Reports module.
Using two dates in Conditions does break the whole function. The second date will not have any hour and minutes fields, and the fields of the first date will be reseted. The datepicker of the second condition additionaly does not work. When deleting the second date field, its not possible to save because of the error message 'Missing required field: Hours'. When only one date is used and it is set as a parameter, the date will be set to a wrong value if date format d.m.Y is used.
Picking date 01.04.2018 and after clicking "update" the date will be 04.01.2018.
Using the date format Y-m-d the does not resolve the issue, but opens another one. The date will be deleted when clicking update on the DetailView of the Reports module.

Expected Behavior

Using dates should work in the Reports module.

Actual Behavior

When using dates everythings seems to be messed up.

Possible Fix

Steps to Reproduce


  1. Go to report module
  2. Create condition
  3. Add a date field and choose a date
  4. Add another date field
  5. After that, saving is not possible (If only one date field is used it can be saved)
    Also, setting one date to parameters does work, but changing the date in DetailView does not take the right date.

Context



Unable to use date fields in the Report module as parameters. Unable to use more than one date as conditions.

Your Environment


SuiteCRM Version used: 7.10.3 (demo)
Browser name and version: Chrome 65.0.3325.181
Environment: demo.suiteondemand.com

Reports Critical Fix Proposed Bug

Most helpful comment

Can we get this marked as a high priority bug, it sounds like it broke a number of things.

All 14 comments

Confirmed.

+1

Probably the same as this issue in the forums. It contains some extra information (browser console errors).

To make this extra maddening as soon as you put a debugger on the getDisplayForField function in aor_util.php it starts to work correctly, both fields show up like you'd expect and you can get a report out of it.

Does anybody know any workaround for this problem? Eagerly waiting for a fix ( well at least our sales team waits ;) )

I'm currently working backward through release versions to see when this bug was introduced. I'll keep you posted on what I find and if I find a workaround.

Found the culprit
https://github.com/salesagility/SuiteCRM/commit/9dfbb7b12156c0ebe1c74e17f991dc29a2cc2bb5

Reverting this commit fixes the problem. I'm still trying to work out why it's broken. In the mean time changing the type from value to field or any other option then back to value gets you a functional date time picker and lets you run your report.

@david-pili thank you for that.
It fixes the problem in the EditView, but not for parameters in DetailView or Dashlets.

Reverting the commit or the workaround I gave?

Detail view and dashlets of reports?

Detail view and dashlets of reports?

@david-pili Yes. When you use conditions as parameter.

This is also broken in Workflows, you can't add conditions with two dates.

Can we get this marked as a high priority bug, it sounds like it broke a number of things.

Bug is still there for dashlets after update to 7.8.19 :(

@Dillon-Brown on LTS 7.8.19 This seems to be worse than before, Now its hit or miss on either field working if I have multiple date-time fields on a report

Was this page helpful?
0 / 5 - 0 ratings