v24.0

Notifuse/notifusev24.0Jan 10, 2026by pierre-b

AI Summary

v24.0 is a bug fix release that resolves an automation enrollment failure caused by the `stats` field being stored as a JSONB scalar instead of an object. The fix includes an automatic migration to correct existing data and ensures new automations always initialize `stats` as an empty object.

Key Highlights

  • Fixed bug causing automation enrollment to fail with error 'pq: cannot set path in scalar'
  • Root cause: `stats` field stored as JSONB scalar (`null`) instead of object (`{}`)
  • Migration v24 automatically fixes all existing automations with invalid stats values
  • Automation creation code now ensures `stats` is always initialized as an empty object
  • No manual upgrade action required - migration runs automatically on startup

Full Release Notes

# v24.0 Release Notes

## Bug Fix: Automation Enrollment Failure

Fixed a bug where enrolling contacts in automations could fail with the error:

```
pq: cannot set path in scalar
```

### Root Cause

When creating automations, if the `stats` field was not explicitly initialized, it could be stored as a JSONB scalar (`null`) instead of an object (`{}`). The `automation_enroll_contact` trigger uses `jsonb_set()` to update stats, which fails on scalar values.

### Fix

- Migration v24 automatically fixes all existing automations with invalid stats values
- The automation creation code now ensures `stats` is always initialized as an empty object

### Upgrade

No manual action required. The migration runs automatically on startup.