I have created a view that lists by user id if the user is subscribed to a list or not.

view

This produces

result

However, when I go to aggregrate the view, grouping by status, count of user ID and sum of weekly notifications, I get the result of 0 for the sum of weekly notifications. I expect this to be 1?

CommentFileSizeAuthor
result.PNG10.67 KBMatt B
View.PNG22.04 KBMatt B
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Matt B created an issue. See original summary.

spncr’s picture

Status: Active » Needs work

This one took some effort to untangle!

It looks like your field Weekly Email Notifications is the Mailchimp Subscription field type, attached to user who have registered to your site.

Unfortunately, right now views are not an accurate way to aggregate data, as they rely solely on the database data for the selected fields.

Historically, Mailchimp subscription data didn't exist at all in the database, as we made the only source of truth Mailchimp and queried their API whenever we needed that information.

More recently, we did add the data to the database, but it is pretty unreliable, because we don't store and update it consistently across the range of functions in this module.

I opened an issue for this:
https://www.drupal.org/project/mailchimp/issues/3196682

Once that is fixed, we can revisit this one, if it isn't resolved by those changes (I expect it will be)