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

Multilingual Logging - Logging/Contribution Summary/Detail Report - Mailing Component Improvements

    Details

    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      Allows for a multilingual CiviCRM install to have logging functionality.

      Improvements to logging summary/detail reports
      -Can now view logging details for insert, delete to trash and delete, not just update
      -Added light icon next to log type for improved aesthetics
      -Logs changes to emails, address' and phone numbers
      -Only shows one record for a single action (Previously, inserting a contact with an after insert trigger on civicrm_contact yields an insert and update in the log report)
      -Fixes logging detail bug as defined in forum topic http://forum.civicrm.org/index.php/topic,29546.0.html
      -Ensures that display names appear and are correct
      -Corrected error with When filter (Log dates are YYYY-MM-DD HH:MM:SS, the when filter uses only YYYY-MM-DD)
      Corrected date on contribution logging details (It formats the date a second time resulting in "Change to Bachman family made by pd@gmail.com on 2013-0-8- 20: 1:1::" - Demo site)

      Currently, to generate the logging report, a temporary table was created each time the report was loaded. Going forward, I switch to actual table with the like the temporary table but with an additional column. This was necessary to remove duplicate log entries. The added column "valid" has a default value of 0 and is updated to 1 by a custom script(updateLogging.php) running as a cron job every five minutes. The script completes very quickly for a small number of events but can take longer if there are thousands. I recommend using a lock to prevent cron overlap.

      Triggers are used to populate the table and since the events are still logged in their respective log table, the logging report table can be truncated at any desired frequency. These triggers are inserted and removed automatically along with the other logging triggers (DAO.php).

      Custom Mailing Components
      I added the ability for users to have their own mailing components that others can not see. I also added the equivalent of a civicrm_aclGroup hook(aclComponent.php) such that components can be made available to users biased on relationships (groups could easily be added). The default components can only be altered by specified roles(Drupal). To do so, I added a column to civicrm_mailing_components and a trigger that populated the field with the logged user id. Currently, to make a component available to all users, a value of 0 must be manually entered.

      I have attached a diff between my site and a fresh install of 4.3.5 (diff.txt) as well as descriptions of the altered tables and custom scripts (Extra.txt).

      Alex Reddon
      alex.reddon@gmail.com

        Attachments

        1. Diff.txt
          86 kB
          Alex Reddon
        2. Extra.txt
          8 kB
          Alex Reddon

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alexr Alex Reddon
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: