Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 934 Bytes

08-dataaudit.md

File metadata and controls

50 lines (35 loc) · 934 Bytes

Data Audit

Topics

  • OroDataAuditBundle (annotations, audit)
  • OroEntityConfigBundle (annotations)

Changes

src/Acme/Bundle/TaskBundle
    Entity
        Task (updated)

Making entity auditable

  1. Add annotation to Task entity
use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\Config;
use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\ConfigField;

use Oro\Bundle\DataAuditBundle\Metadata\Annotation as Oro;  

 * @Oro\Loggable
 * @Config(
 *  defaultValues={
 *      "dataaudit"={"auditable"=true}
 *  }
 * )
  1. Add annotation to Task entity fields
   * @Oro\Versioned
   * @ConfigField(
   *  defaultValues={
   *      "dataaudit"={"auditable"=true}
   *  }
   * )
  1. Run command oro:entity-config:update

  2. Go to System -> Entities and check updates

  3. Make any changes to any task and go to System -> Data Audit and check audit logs