Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-20536

Group filter in the views module is incorrect and has usability issues

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.7.19, 4.6.28
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      The Group ID filter in the CiviCRM views module has the following issues:

      • the generated SQL query is incorrect. When including a group, the generated WHERE clause is: (civicrm_group.id = {group_id}), where it should really be (civicrm_group.id = {group_id} AND civicrm_group.status = 'Added'). When excluding a group the generated WHERE clause is: (civicrm_group.id != {group_id}), where it should really be (civicrm_group.id IS NULL OR (civicrm_group.id = {group_id} AND civicrm_group.status = 'Added')) as we do not want to exclude contacts that are not part of any group.
      • in the UI, the groups are specified by group_id, which is not user friendly. It would be much better to pick the groups by name
      • in the UI, there is no way to include or exclude multiple groups together in the query
      • also see linked ticket listing more issues.

      This seems to stem from the fact that the group selection and filter is done as a standard numeric field with Drupal view. It would be much better if we bundled our own UI, allowing to include or exclude multiple groups, and generated our own resulting SQL where clause.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                nganivet Nicolas Ganivet
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: