0

Using Drupal 7.58 and Views 3.18

I am simply trying to display Commerce Order Owner role on a View. Using the Commerce Order:Owner relationship, I have access to a large set of user fields and properties... except the User role? Did I miss anything here?

EDIT : I am using Aggregation on my View (if you want to replicate this issue)

EDIT#2 : interesting workaround here, simply add the user role field before activate the aggregation... Still, I could not manage to build a chart and only a list of roles counted per user, using Table with aggregation options display

enter image description here

Related question : How to add the "user role field" in View showing users

0

No clue why it's not showing. The Views module defines a "User: Roles" field, and I see that just fine in my own development environment for a View joining to Users via the "Commerce Order: Owner" relationship.

3
  • Thanks Ryan for your time on this test. I will try again this week and let you know if I find the answer to that mystery.
    – Toki
    Apr 8 '18 at 9:09
  • I may have found something interesting. Actually, the User: roles field is no more available if you use aggregation. I need this to show simple stats for my client (x orders from people with role Public customer and y orders from people with role Private customer, for example). Is it a bug or is it working as planned?
    – Toki
    Apr 9 '18 at 12:12
  • Yep, that’s an important detail. Not all fields support aggregation due to how their data is stored in the database. Roles do not exist in their own column, so you’d need a custom module to make this work. Apr 10 '18 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.