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

Fix use groupByFormula while build select columns in report #7980

Open
wants to merge 3 commits into
base: staging
from

Conversation

@kuzmany
Copy link
Contributor

kuzmany commented Oct 25, 2019

Please be sure you are submitting this against the staging branch.

Q A
Bug fix?
New feature?
Automated tests included?
Related user documentation PR URL
Related developer documentation PR URL
Issues addressed (#s or URLs)
BC breaks?
Deprecations?

Description:

We noticed error during the build report query.
This happend If groupByFormula definition exists. But this definition expect apply just if we're using group by this column. Without groupBy definition, we use standard column statement.

Steps to reproduce the bug:

  1. Create a form > make submissions
  2. Create a form submission report > add submission date column
  3. Export in CSV or XLSX and see that the date is including time with always 10 pm UTC.

Steps to test this PR:

  1. Load up this PR
  2. Repeat all steps, and see date in correct way
  3. Just If we add this column to groupBy column, then will apply groupByFormula statement.
@kuzmany kuzmany added this to the 2.16.0 milestone Oct 25, 2019
Copy link

florentpetitjean left a comment

Tested and change is working I see the real date of submission.
But I found a bug when I open some of the already created reports in mautibox it shows a symphony error (report ID 3)
image

Error logs :
[2019-10-28 08:01:49] mautic.ERROR: Symfony\Component\Debug\Exception\ContextErrorException: PHP Notice - Undefined index: count_query - in file /var/app/current/code/pulls/7980/app/bundles/ReportBundle/Views/Report/details.html.php - at line 175

Don't know if it's related to your fix tough.
Thanks

@kuzmany

This comment has been minimized.

Copy link
Contributor Author

kuzmany commented Oct 29, 2019

@florentpetitjean Last commit should fixed it

Copy link

florentpetitjean left a comment

works well now
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.