Is it possible to get a list of all Expiry dates by role?

Comments

stewsnooze’s picture

Status: Active » Postponed (maintainer needs more info)

although the current implementation of views in role expire is buggy it is functional. Have you tried creating a view?

teliseo’s picture

Version: 6.x-1.9 » 6.x-1.x-dev
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new16.21 KB

Here is a patch against current dev. (2010-Jul-11) that makes major changes to views to work properly and add features. Among the changes:

  • Join of the expiration role ID back to the role table is now done properly so that the role name of a particular expiration record can be accessed without manually adding relationships or other trickery.
  • The joins are now left joins so that reference to expiration fields does not remove records of users without role expirations. If you want the old behavior, add a filter specifying Is not empty (NOT NULL) for the field Role expiration role ID.
  • A default view has been added (and linked to the admin menu) that displays all expirations, including multiple expirations per user.
  • The Role expiration User ID field has been removed (when users is the base table, currently the only option) since it is redundant and confusing.
  • Callbacks of filters and arguments are now more type-appropriate (i.e. filter/argument options make more sense).
  • Texts and field names have been improved (in my opinion) for consistency.

With these changes, it should be unnecessary to expose the role_expire table as a base table, as had been previously suggested.

These changes should fix all issues raised by this bug and also bugs #856628: Role Expiration Time Views field & Role ID relationship act as filter and #735336: Views display for multiple role expirations.

keva’s picture

I'm using this module on a site on a site which relies on this patch.

Is it possible to get that patch committed (it's well-reviewed), then redo this patch with the new dev version?

wizonesolutions’s picture

The relationship is unavailable when Node is the base table. Not entirely sure why but looking into ways to fix this. I'll probably just hack something together, re-roll this patch, and get some feedback.

wizonesolutions’s picture

OK, this is a re-roll and an enhancement. The fields will now appear and work when Node is the base table. An extra relationship appears; ignore that. No relationship needs to be added in this case.

There's another issue in that filtering by role excludes all roles without an expiration at all, which in my case I didn't want. However, this isn't a big enough deal for me to fix it, just wanted to point it out. I just cloned the display and made another version of it as a workaround.

Patch attached.

stewsnooze’s picture

Status: Needs review » Needs work

This patch won't apply. It should be rolled from within the role_expire directory

wizonesolutions’s picture

Ah sorry, you're probably right though it worked for me. Forgot that bzr does things a little different.

Will reroll but you can try patch -p1 < filename as well.

sharplesa’s picture

Version: 6.x-1.x-dev » 6.x-1.11
Assigned: Unassigned » sharplesa
Status: Needs work » Needs review
sharplesa’s picture

Status: Needs review » Fixed

Rolled patch at http://drupal.org/node/649256#comment-5291110 into new version 6.x-1.12.

Status: Fixed » Closed (fixed)

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