Active
Project:
Views Aggregator Plus
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Sep 2024 at 13:27 UTC
Updated:
27 Feb 2026 at 08:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
anybodyComment #3
anybodyComment #4
anybody@maintainers: Could you maybe explain a bit how the module handles numeric values and if (or why not) raw values are used?
Currently this seems unusable for non-default number formattings used in the view output, as described in the example.
We'd like to help, but it would be great to have a better starting point on how and where this should be fixed and which impediments you see. Thank you!
Comment #5
tr commentedI was not involved in writing that code and I don't know what the original intent was for how to handle number formatting. I would have to first try to reproduce this problem then figure out what to do about it. Usually, formatting numbers would be something done as late as possible, because this is essentially just theming/presentation and could differ on a per-user/per-page/per-view basis.
Since you already have a site set up that uses a different number format, you are in a better position to create a test case that demonstrates the problem. That is the first step in finding a solution. If you can do that, it would go a long way towards getting this fixed.
Comment #6
mortona2k commentedMR36 fixes the issues with number formatting with decimals/commas: https://www.drupal.org/project/views_aggregator/issues/3482129
To test, I added a decimal field to the article content type in the standard install profile, and generated content with devel generate.
Then I created a view that lists article titles and the decimal field, formatted with views aggregator.
Group sum:

Column sum:

There are a handful of options to test, like enabling prefix/suffix, which is configured in the field settings.
Comment #7
grevil commentedFor me it works great out of the box! I am only using the patch from https://git.drupalcode.org/project/views_aggregator/-/merge_requests/37
I adjusted my decimal fields view settings to have the "decimal dot" as the "thousand separator", and a "comma" as my "decimal point" representation and the output is as expected (including the sum):

To be fair I don't do any complex calculation or grouping, so there might be still issues when displaying decimal numbers.