I am using the role reference module (https://www.drupal.org/project/rolereference) to allow me to add roles to a content type.
For some context, in my case we are managing policies. The policy content type will have fields such as "Owner" and "Sponsor" that will reference roles using the module above.
My issue comes when trying to put together views. I am able to access the role reference field through views without issue, but its sorting is based role id (rid) instead of the role name.
I am attempting to sort by role name, and am unable to create a relationship as Role is not available.
What is the best way to do this? At the moment it appears that writing a custom module that invokes hook_views_query_alter() to alter the query before it runs might be the best solution.
I'm wondering if anyone has had any success exposing roles as a relationship within views?
Thanks in advance.