You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that in testing this I checked
1) searching in search builder with groups as a criteria
(checked that correct groups show & only 'Added' ones)
2) Exporting - groups show per above when selected as an export field
3) Groups tab on a contact correctly shows added & removed groups
4) Api calls per tests
5) Manage groups - clicking through shows correct status for all members and it is possible to alter the group criteria to include 'Removed' and they show with the correct status
// if note field is subject then return subject else body of the note
@@ -1370,6 +1381,7 @@ public function query($count = FALSE, $sortByChar = FALSE, $groupContacts = FALS
1370
1381
$this->_paramLookup['group'][0][1] = key($value);
1371
1382
}
1372
1383
1384
+
// Presumably the lines below come into manage groups screen.
1373
1385
// make sure there is only one element
1374
1386
// this is used when we are running under smog and need to know
1375
1387
// how the contact was added (CRM-1203)
@@ -2517,16 +2529,6 @@ public static function fromClause(&$tables, $inner = NULL, $right = NULL, $prima
2517
2529
);
2518
2530
}
2519
2531
2520
-
// add group_contact and group_contact_cache table if group table is present
2521
-
if (!empty($tables['civicrm_group'])) {
2522
-
if (empty($tables['civicrm_group_contact'])) {
2523
-
$tables['civicrm_group_contact'] = " LEFT JOIN civicrm_group_contact ON civicrm_group_contact.contact_id = contact_a.id AND civicrm_group_contact.status = 'Added' ";
2524
-
}
2525
-
if (empty($tables['civicrm_group_contact_cache'])) {
2526
-
$tables['civicrm_group_contact_cache'] = " LEFT JOIN civicrm_group_contact_cache ON civicrm_group_contact_cache.contact_id = contact_a.id ";
2527
-
}
2528
-
}
2529
-
2530
2532
// add group_contact and group table is subscription history is present
2531
2533
if (!empty($tables['civicrm_subscription_history']) && empty($tables['civicrm_group'])) {
2532
2534
$tables = array_merge(array(
@@ -2641,7 +2643,7 @@ public static function fromClause(&$tables, $inner = NULL, $right = NULL, $prima
2641
2643
continue;
2642
2644
2643
2645
case'civicrm_group':
2644
-
$from .= "$side JOIN civicrm_group ON (civicrm_group.id = civicrm_group_contact.group_id OR civicrm_group.id = civicrm_group_contact_cache.group_id)";
2646
+
$from .= "$side JOIN civicrm_group ON civicrm_group.id = civicrm_group_contact.group_id ";
2645
2647
continue;
2646
2648
2647
2649
case'civicrm_group_contact':
@@ -4259,8 +4261,9 @@ public static function getPrimaryCondition($value) {
0 commit comments