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

Activity Batch Update did not provide the user with a relationship between activity and individual.

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.0.2
    • Fix Version/s: 3.4.6
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      I raised this issue on the forums, http://forum.civicrm.org/index.php?topic=20260 , and Dave Greenberg helped sort out the details. The submitted patch shows the creator of the activity as well as to who the activity affects.

      It was necessary to modify civicrm/CRM/Contact/BAO/Contact/Utils.php and civicrm/CRM/Activity/Form/Task/Batch.php.

      In Utils the following lines were modified:

      Line 691, 711-714, 746

      In Batch.php

      Line 81

      This works properly on Drupal 7 Civi 4.0.2.

      The final query that runs looks like this.
      SELECT contact_source.id as contactId, civicrm_activity.id as componentId, contact_source.sort_name as source_sort_name, contact_target.sort_name as target_sort_name
      FROM civicrm_activity as civicrm_activity
      INNER JOIN civicrm_contact as contact_source ON ( contact_source.id = civicrm_activity.source_contact_id )
      LEFT JOIN civicrm_activity_target ON (civicrm_activity_target.activity_id = civicrm_activity.id)
      LEFT JOIN civicrm_contact as contact_target ON ( contact_target.id = civicrm_activity_target.target_contact_id )
      WHERE $whereClause
      Group By componentId";

      The improvement is subpar because it utilizes fixed table names, not the property versions found in the original.

        Attachments

        1. Batch.patch
          0.4 kB
          Max Bronsema
        2. Batch.patch
          2 kB
          Max Bronsema
        3. Utils.patch
          6 kB
          Max Bronsema
        4. Utils.patch
          6 kB
          Max Bronsema

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              themusician Max Bronsema
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 4 hours
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified