Project

General

Profile

Edit Copy Actions

Feature #10202

open

Implement Action History (Audit Log) for Coupon Management System

Added by Pavan Kumar Murala 2 days ago. Updated 2 days ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
08/04/2026
Due date:
08/04/2026 (2 days late)
% Done:

100%

Estimated time:
4:00 h
Spent time:

Description

Add an Action History feature to the Coupon Management System to track all important user and system actions performed on coupons. This will provide an audit trail for monitoring, debugging, and compliance purposes.

  1. Scope

Record the following actions in the Action History table whenever they occur:

Event Trigger Action Value
----------------------------- --------------------------------- -----------------
Create Coupon `createCoupon` `create`
Update Coupon `editCoupon` `update`
Soft Delete Coupon `deleteCoupon` `delete`
Manual Active/Inactive Toggle Status toggle in edit/update flow `status_change`
Publish Coupon Publish flow `publish`
Auto Activate (Cron) Scheduled activation job `auto_activate`
Auto Deactivate (Cron) Scheduled deactivation job `auto_deactivate`
  1. Action History Fields

Each history record should capture:

  • Coupon ID
  • Coupon Code
  • Action (`create`, `update`, `delete`, `status_change`, `publish`, `auto_activate`, `auto_deactivate`)
  • Performed By (User ID/System)
  • Timestamp
  • Previous Status (if applicable)
  • New Status (if applicable)
  • Optional Remarks/Metadata
  1. Acceptance Criteria
  • Action history is created whenever a supported event occurs.
  • Manual actions store the authenticated user as the actor.
  • Cron-triggered actions store the actor as `System` (or equivalent system user).
  • History records are immutable after creation.
  • Existing coupon functionality remains unaffected.
  • Action history can be queried for future audit/reporting purposes.
  1. Technical Notes
  • Integrate history logging into existing coupon service methods.
  • Reuse the existing `editCoupon` flow for `update` and `status_change` logging where applicable.
  • Ensure cron jobs create history entries only when an actual status change occurs.
  • Keep action values standardized:
    • `create`
    • `update`
    • `delete`
    • `status_change`
    • `publish`
    • `auto_activate`
    • `auto_deactivate`

Add

Subtasks


Add

Related issues

Actions #1

Updated by Pavan Kumar Murala 2 days ago

  • Status changed from New to In Progress
  • % Done changed from 100 to 0
Actions #2

Updated by Pavan Kumar Murala 2 days ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
  • Estimated time changed from 3:00 h to 4:00 h
Edit Copy Actions

Also available in: Atom PDF