I'm using the provided view that lists the available groups. I was hoping to allow my users to search for groups by the group description but wasn't able to add Organic groups: Group: Description to the filter. Am I just not seeing this functionality or is it not there yet?

Comments

ñull’s picture

+1 (subcribing)

Yes I feel the same that this filter is missing. I want my users to be able to search both in the node Title (groupname) as well as the Group description.

oxford-dev’s picture

+1

christianchristensen’s picture

Status: Active » Needs review

We too needed to filter on group description as well as name; turns out this is really straightforward given that description is a textfield defined in the views.inc. All that the definition needed was a way to handle the field as a filter - which is a string type.

Note: could not upload a file right now...

Index: og_views.views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/og/modules/og_views/Attic/og_views.views.inc,v
retrieving revision 1.13.4.11
diff -u -p -r1.13.4.11 og_views.views.inc
--- og_views.views.inc	4 Mar 2010 07:28:59 -0000	1.13.4.11
+++ og_views.views.inc	13 Dec 2010 19:51:27 -0000
@@ -166,6 +166,10 @@ function og_views_data_og() {
       'format' => FILTER_FORMAT_DEFAULT,
       'click sortable' => FALSE,
     ),
+    'filter' => array(
+      'handler' => 'views_handler_filter_string',
+      'help' => t('Description field on organic group enabled types.'),
+    ),
   );
   $data['og']['member_count'] = array(
     'title' => t('Group: Members count'),
dawehner’s picture

Version: 6.x-2.0 » 6.x-2.x-dev
StatusFileSize
new636 bytes

Here is a patch which additional allows to sort by the description.
This might not be a common use case but there is no real reason why you shouldn't (beside the speed).
Afaik this key is there to define non-simple fields like some which extends views_handler_field_prerender_list, which can't sort.

dawehner’s picture

StatusFileSize
new708 bytes

This patch allows to sort by default, too.

Grayside’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new708 bytes

Slight text change, Otherwise solid.

Grayside’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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