Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Exclude wasn't working with more than one record

This was generating (id != 7 OR id != 9) which gleefully returns both 7
and 9. Switch over to an ENTRYAGGREGATOR of AND. This is exposed in the
Membership page of Groups. Groups with one user had that user excluded
from the member autocomplete, but as soon as you have two members that
stopped working (same for groups).
  • Loading branch information...
commit 7115dc41a582ef07c81e3be999e8a3150f34b6d2 1 parent 81fc7cb
Kevin Falcone authored March 14, 2013
2  share/html/Helpers/Autocomplete/Groups
@@ -77,7 +77,7 @@ $groups->Limit(
77 77
 
78 78
 # Exclude groups we don't want
79 79
 foreach (split /\s*,\s*/, $exclude) {
80  
-    $groups->Limit(FIELD => 'id', VALUE => $_, OPERATOR => '!=');
  80
+    $groups->Limit(FIELD => 'id', VALUE => $_, OPERATOR => '!=', ENTRYAGGREGATOR => 'AND');
81 81
 }
82 82
 
83 83
 my @suggestions;
2  share/html/Helpers/Autocomplete/Users
@@ -111,7 +111,7 @@ while (my ($name, $op) = each %fields) {
111 111
 
112 112
 # Exclude users we don't want
113 113
 foreach (split /\s*,\s*/, $exclude) {
114  
-    $users->Limit(FIELD => 'id', VALUE => $_, OPERATOR => '!=');
  114
+    $users->Limit(FIELD => 'id', VALUE => $_, OPERATOR => '!=', ENTRYAGGREGATOR => 'AND');
115 115
 }
116 116
 
117 117
 my @suggestions;

0 notes on commit 7115dc4

Please sign in to comment.
Something went wrong with that request. Please try again.