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

multiple instances of entity tags are possible with a single entity -> tag

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.5
    • Component/s: None
    • Labels:
      None

      Description

      If an entity tag is created multiple times for the same contact + tag then multiple instances of that entity tag are created in the civicrm_entity_tag table. This results in one entity being listed multiple times in the search results when searching by tag. AFAIK this would only really happen with tagging via the API, since the tag editing interface in civicrm would prevent this. I would suggest either using an UPDATE instead of INSERT on the api, applying a DISTINCT to the search query, or adding a UNIQUE key on the civicrm_entity_tag table consisting of entity_id and tag_id, or any combination of these to resolve this.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              crunchywelch Aaron Welch
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: