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

          [CRM-18360] Expose logging data through GET api
          Joe Murray added a comment -

          I like the information being returned, it's a welcome addition to the api to be able to access this, but unfortunately I have no opinion on how to improve the data format returned.

          Eileen McNaughton added a comment -

          I'm not sure if that is unfortunate - I rather like the idea of not having to do any extra work

          Coleman Watts added a comment -

          So has that functionality and test been added and if so can this issue be closed?

          Eileen McNaughton added a comment -

          still waiting QA

            People

            • Assignee:
              Eileen McNaughton
              Reporter:
              Eileen McNaughton

              Dates

              • Created:
                Updated:
                Resolved: