First, thanks for this great module.
Just wanted to know if/when you would implement the SUM aggregation ?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cerup’s picture

I''d also like to know.

irakli’s picture

Last I checked, sum aggregation needs a patch to Views module. I will have to check again and will post response/patch. Will try to do it sooner rather than later.

Thanks.

SanDiego’s picture

Title: SUM » AVERAGE

SUM, AVERAGE, etc. type of functions would be a great addition to functionality. Looking forward to receiving the patch. Thanks...

redben’s picture

Title: AVERAGE » The rest of Aggregate Functions (AVG SUM MIN MAX)

Re-changing title

Skispcs’s picture

I would also like the SUM and other features.

chrisirhc’s picture

FileSize
2.13 KB

Here's a diff of my changes in order to make it work with MIN (tested), MAX, SUM, AVG. (This is based on the 6.x-rc2 release and it is not the standard patch)

It's cleaner than the patch given in: #702176: Rewriting GROUP BY part of the SQL and cheating to integrate Sum and Avg functions

Could someone please test this out for me?

dafeder’s picture

Working for me so far, thanks!

servantleader’s picture

Status: Active » Needs review

Works great for me. I was using the MIN function in my use case. No errors or problems.

rsevero’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
2.75 KB

I've just adapted the patch from comment #6 so it can be applied in current code and tested it. It's working fine.

Please consider integrating it into code.

jm.federico’s picture

Patch againts RC2 (reversed, DO NOT USE) check #14

frjo’s picture

I have been testing patch #9 on a local dev site and it works well. I'm using the "sum" function. Have not encountered any problems, error messages in the log etc.

NaX’s picture

I am using #9 without any problems. Based on the feedback here I think this is ready to be committed.

Please note that it looks like the patch on #10 is inverted, like a rollback/remove feature patch.

bfellows’s picture

This is a great addition to the v-groupby module. I was able to successfully patch the module manually; I am a linux idiot and couldn't get it to take via the command line patch util.

jm.federico’s picture

Rerolling againts RC2. patch in #10 is reversed.

@NaX: thanks

mattiasj’s picture

Thanks alot for this patch, truly helped out and works like a charm.

lord_of_freaks’s picture

Suscribing

mjumbewu’s picture

Subscribing

arithmetric’s picture

Attached is an updated patch for the latest dev version (6.x-1.x) from the patch on #14 (which is for 6.x-1.0-rc2).

patcon’s picture

Holy crap. This is awesome. Is anyone taking donations for this?! It totally just saved my keister.

patcon’s picture

Oh hey, here's a patch that will work with drush_make (-p0 instead of -p1, which is needed to strip off the module directory).

patcon’s picture

Wow. This, along with views_customfields, makes views so fracking powerful. I'm blown away by how well this works. Just, wow.

obrienmd’s picture

When trying to patch latest 6.x-1.x-dev with #18 or #20, I get:

Hunk #1 FAILED at 62.
Hunk #2 FAILED at 260.
2 out of 2 hunks FAILED -- saving rejects to file handlers/views_groupby_handler_field_groupfields.inc.rej
patcon’s picture

#20 is for the stable rc, since I needed a non-moving target for my drush_make files. But there's no dev build more recent than what #18 was rolled against anyhow. trying patching with the dev one from within the actual module's folder with -p0, and it should work :)

~/path/to/dir/views_groupby $ patch -p0 < patchie-patch-patch.patch

obrienmd’s picture

Looks like that worked, thanks :)

Shadlington’s picture

Just chipping in to say that #20 worked great for me. This should really get committed...

obrienmd’s picture

Agreed, this needs to be committed ASAP. I makes the module much more widely useful.

patcon’s picture

I totally agree. This patch by @chrisirhc is really clean, and it would be great to see #20 committed. Works great for me.

justafish’s picture

#20 also worked well against rc2 for me. Any reason we can't commit this?

obrienmd’s picture

Update: irakli has let me know s/he will be reviewing this soon!

patcon’s picture

Awesome!

jm.federico’s picture

Absolutely fantastic! Thanks!

mattiasj’s picture

thanks!

bobju’s picture

Thanks! :-)

irakli’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

hartogsmith’s picture

massive, massive thank for the original module and this patch.

joya’s picture

Subscribing

hendrohwibowo’s picture

#20 and #23 works like a charm.

Sorry if this issue is already closed. I just try drupal for one month (mar 2012) and i have to express my thank yo since i am relieved by the patch.

Thank you again