As the title indicates, implement handlers to add Subqueue Id field and sort by it in views.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

spesic’s picture

spesic’s picture

Status: Active » Needs review
spesic’s picture

Updated patch to support the following:

- Create a view of subqueues filtered by master queue machine name
- Added subqueue_id field, sort, argument and filter
- Added custom handler for subqueue_id as contextual argument, allow overriding view title using subqueue title by using %[n]

jojonaloha’s picture

Looking good. I still need to test it out, but a manual review looks good. The only thing I would suggest is that we use the same group as the other fields. So 'group' => t('Entityqueue'),

jojonaloha’s picture

After testing the patch I noticed that other fields showed up in a Subqueue group. I also found out that the Entity API module can actually do a lot of work for us in integrating with Views. I ended up taking out some of the code in entityqueue_views_data_alter() and added the entityqueue_entity_property_info() a basic implementation. It looks like Entity API adds field, filter, sort and argument handlers for all the properties, even adding a relationship for the user. The one exception is we still need to override the default views argument handler for the Queue Name to use the one provided in patch #3

Attached patch implements hook_entity_property_info() and removes most of the entityqueue_subqueue definitions in entityqueue.view.inc.

spesic’s picture

You sir rock!
I'll check out your patch out and see to integrate views argument handler.

nerdacus’s picture

The patch in #5 works perfectly!
Not only do I have the ability to filter by subqueue IDs but I can sort and filter by others.

  • jojonaloha committed ac398d0 on 7.x-1.x
    Issue #2399701 by spesic, jojonaloha: Add views field and sort handlers...
jojonaloha’s picture

Status: Needs review » Fixed

Committed ac398d0

Status: Fixed » Closed (fixed)

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