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

Expose logging data through GET api

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.4
    • Fix Version/s: 4.7.8
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      Developer Doc
    • Funding Source:
      Contributed Code

      Description

      In the course of fixing up logging related issues we have the option to fairly trivially expose logging data through the api. eg.
      civicrm_api3('logging', 'get', array('log_conn_id'));

      My primary motivation for this at this stage it to add a test. However, it does present a question of how to present the data. The current function presents an array like

      array(0 => array(
      'action' => 'Update'
      'id' => '3'
      'field' => 'sort_name'
      'from' => 'Anderson, Anthony'
      'to' => 'Anderson, Dopey'
      'table' => 'civicrm_contact'
      'log_date' => '2016-04-05 04:30:27'
      'log_conn_id' => '123456'
      );

      This doesn't really fit with any existing api pattern - but I can't come up with a good argument for a different format since it is very multi-dimensional, ie. a change could affect multiple tables and mutliple entities within those tables. Using the format the code already likes is also the easiest.....

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: