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

contact logging detail report may have missing/wrong altered and altered by name

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.3
    • Fix Version/s: 4.4.4
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      at the top of the logging detail report (visible when clicking the "update" link in the contact logging summary report) we have a sentence reading: "Change to [contact-linked] made by [user-linked] on [date]"

      there are two scenarios where the data may be wrong or incomplete:

      • the whoWhomWhen sql used to retrieve values only uses connection ID and date to retrieve the values. if a bulk action was responsible for the change, there may be multiple contact log records matching that criteria, potentially resulting in the wrong one being retrieved
      • that query assumes the change will be reflected in the contact table. but if the change was made via inline edit, the log may only be present in the related table (e.g. _email). consequently, the query using connection ID and date fails, because no such record exists in the contact log table

      I propose we handle this another way, represented by our commit here: https://github.com/nysenate/Bluebird-CRM/commit/68f392e2dcfa8e95e55083a0c3b84b2274c6223f

      since the user is only ever directed to this report from the contact logging summary report, and since in that report we've already done the work of identifying the altered ID/name and altered by ID/name, we should just pass the values in the URL, as we do the conn_id and date. that way we can completely skip the whoWhomWhen query.

      note –
      in my commit above, you can ignore the changes to CRM/Report/Form/Contact/LoggingDetail.php
      I began by altering the whoWhomWhen query to filter on the contact ID. while it improved the query, the solution represented in the other two files is more complete.

      if this solution is agreeable, let me know and I'll file a PR.

        Attachments

          Activity

            People

            • Assignee:
              lcdweb Brian Shaughnessy
              Reporter:
              lcdweb Brian Shaughnessy
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: