Ctrl K
ring2all.com

Change History Module Documentation

Table of Contents

  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Change Fields Reference
  5. Common Scenarios & Examples
  6. Limitations & Important Notes
  7. Troubleshooting Tips
  8. Glossary

---

1. Module Overview (Technical)

What Is Change History?

Change History is a configuration change tracking module that records all modifications to system configuration. Unlike Audit Logs (which tracks all activity including logins), Change History focuses specifically on CREATE, UPDATE, and DELETE operations, storing the actual data changes (before/after values).

Architecture

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│                 Change History Architecture                     │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Configuration Change                                           │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        Any Module (Extensions, Gateways, Routes, etc.)   │   │
│  │                                                          │   │
│  │  Before:                          After:                 │   │
│  │  ├─ Name: "John Doe"              ├─ Name: "Jane Doe"   │   │
│  │  ├─ Number: 1001                  ├─ Number: 1001       │   │
│  │  └─ Enabled: true                 └─ Enabled: false     │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Logged with old/new values                             │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        public.change_history                             │   │
│  │                                                          │   │
│  │  | action | resource | user | old_values | new_values | │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Displayed in Viewer                                     │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        Change History Page                               │   │
│  │                                                          │   │
│  │  ┌─────────────────────────────────────────────────────┐ │   │
│  │  │Time   │Action │Resource│User │ Changes            │ │   │
│  │  ├───────┼───────┼────────┼─────┼────────────────────┤ │   │
│  │  │10:30  │UPDATE │extensn │admin│ Name: John→Jane    │ │   │
│  │  │       │       │        │     │ Enabled: true→false│ │   │
│  │  └─────────────────────────────────────────────────────┘ │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Key Tables

TablePurpose
public.change_historyConfiguration change records

Key Files

FileDescription
modules/changeHistory/Frontend module
modules/changeHistory/api/changeHistoryApi.tsAPI calls
modules/changeHistory/types/changeHistory.types.tsType definitions
---

2. Module Overview (Commercial/Business)

Business Value

Change History provides configuration visibility:

Without Change HistoryWith Change History
Unknown who changed whatFull attribution
Lost previous settingsBefore/after values
Can't undo changesReference old values
No change documentationComplete record

Use Cases

  1. Configuration Recovery
- Find previous settings

- Reference old values

  1. Troubleshooting
- "What changed?"

- Identify breaking changes

  1. Accountability
- Who made the change

- When it was changed

  1. Auditing
- Review configuration changes

- Compliance documentation

Feature Highlights

FeatureBenefit
Before/AfterSee exact changes
User AttributionKnow who changed
Resource TrackingWhat was modified
Date FilteringFind by time
User FilteringFind by person
Action FilteringCreate/Update/Delete
---

3. Module Overview (End User/Administrator)

What Can You Do?

  • View all configuration changes
  • See before and after values
  • Filter by date range
  • Filter by action type
  • Filter by resource type
  • Filter by user
  • Search across changes

Change History Interface

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Change History                                     │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Filters:                                                       │
│  ├─ Range: [Today ▼]                                           │
│  ├─ Actions: [All Actions ▼]                                   │
│  ├─ Resource: [                    ]                           │
│  ├─ User: [All Users ▼]                                        │
│  └─ [🔄 Refresh] [Clear Filters]                               │
│                                                                 │
│  🔍 [Search by action, resource, or user...              ]     │
│                                                                 │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │ Time     │Action │Resource  │Res ID│ User  │Changes      │  │
│  ├──────────┼───────┼──────────┼──────┼───────┼─────────────┤  │
│  │ 10:30    │Update │extension │ 123  │ admin │ [View ▼]    │  │
│  │          │       │          │      │       │ Name: J→J   │  │
│  │          │       │          │      │       │ Ena: T→F    │  │
│  │ 10:28    │Create │user      │ 456  │ admin │ [View ▼]    │  │
│  │ 10:25    │Delete │gateway   │ 789  │ super │ [View ▼]    │  │
│  │ 10:20    │Update │queue     │ 101  │ admin │ [View ▼]    │  │
│  └───────────────────────────────────────────────────────────┘  │
│                                                                 │
│  Showing 1-25 of 567 records                                    │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Change Details View

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Change Details                                     │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Resource: extension #123                                       │
│  Action: UPDATE                                                 │
│  User: admin@company.com                                        │
│  Date: 2026-01-16 10:30:45                                     │
│  IP: 192.168.1.100                                             │
│                                                                 │
│  ┌─────────────────────────────────────────────────────────────┐│
│  │ Field              │ Old Value      │ New Value           ││
│  ├────────────────────┼────────────────┼─────────────────────┤│
│  │ effective_name     │ John Doe       │ Jane Doe            ││
│  │ enabled            │ true           │ false               ││
│  │ forward_enabled    │ false          │ true                ││
│  │ forward_destination│ (empty)        │ 1002                ││
│  └─────────────────────────────────────────────────────────────┘│
│                                                                 │
│  [Close]                                                        │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Quick Tips

TIP
View Changes: Click "View Changes" to see old/new values side-by-side.
TIP
Recovery: Use before values to restore previous configuration.
NOTE
Data Changes Only: Login/logout not tracked here (see Audit Logs).

---

4. Change Fields Reference

Display Columns

ColumnDescription
IDUnique change ID
TimestampWhen change occurred
ActionCreate/Update/Delete
ResourceType of object
Resource IDSpecific record ID
UserWho made the change
IP AddressSource IP
ChangesView details button

Action Types

ActionDescription
CreateNew record created (new values only)
UpdateRecord modified (old + new values)
DeleteRecord removed (old values only)

Change Details

FieldDescription
Field NameWhat was changed
Old ValuePrevious value
New ValueCurrent value
---

5. Common Scenarios & Examples

Scenario 1: Find What Changed on Extension

  1. Filter Resource by "extension"
  2. Search for extension number
  3. View change history
  4. Click "View Changes" for details

Scenario 2: Recover Old Setting

  1. Find the UPDATE record
  2. View Changes
  3. Note the Old Value
  4. Manually restore if needed

Scenario 3: Investigate Breaking Change

  1. Set date range to when issue started
  2. Filter by relevant resource type
  3. Review recent changes
  4. Identify problematic change

Scenario 4: User Change Audit

  1. Filter by specific User
  2. Set date range
  3. Review all their changes
  4. Export if needed

---

6. Limitations & Important Notes

Technical Notes

NOTE
Configuration Only: Tracks data changes, not logins/access.
NOTE
Read-Only: History cannot be modified.
WARNING
Sensitive Data: Old values may contain passwords (masked).

Comparison: Change History vs Audit Logs

FeatureChange HistoryAudit Logs
FocusData changesAll activity
ActionsCreate/Update/DeleteAll actions + Login
ValuesBefore/After storedMetadata only
PurposeConfig recoveryCompliance

Best Practices

  1. Review Regularly: Check for unexpected changes
  2. Filter Smart: Use resource type to narrow results
  3. Document Rollbacks: Record manual reversions
  4. Archive Important: Export critical change records
  5. Use for Recovery: Reference old values carefully

---

7. Troubleshooting Tips

Common Issues

SymptomPossible CauseSolution
No recordsToo restrictive filterClear filters
Missing changeNot tracked resourceSome resources may not be tracked
Values maskedSensitive fieldsPasswords intentionally hidden
Slow loadingLarge date rangeReduce date range
No old valuesCREATE actionCreates only have new values

Diagnostic SQL

Recent configuration changes:

Sql
SELECT 
  timestamp,
  action,
  resource,
  resource_id,
  user_email,
  old_values,
  new_values
FROM public.change_history
ORDER BY timestamp DESC
LIMIT 50;

Changes by resource type:

Sql
SELECT 
  resource,
  action,
  COUNT(*) as count
FROM public.change_history
WHERE timestamp >= NOW() - INTERVAL '7 days'
GROUP BY resource, action
ORDER BY count DESC;

---

8. Glossary

TermDefinition
ChangeSingle configuration modification
Old ValuePrevious field value
New ValueCurrent field value
ResourceType of configuration object
Resource IDSpecific record identifier
DiffDifference between old/new
---

Lua Script Status ℹ️

No Lua Handler Required

ComponentStatus
Change Historyℹ️ Backend-logged - recorded by API when data changes
Change History is a frontend reporting module. Change logging is performed automatically by the backend when configuration changes are made via the API. No Lua handlers are used.

---

Documentation last updated: January 2026
AI Assistant

👋 Hello! I'm your Ring2All documentation assistant. I can help you find information about configuring and using the Ring2All PBX platform.

How can I help you today?