# Changelog

All notable changes to the Deal Flow plugin are documented here.

## [0.8.0] - 2026-03-15

### Added
- **Contact timeline injection** — deals appear on Mautic contact timeline
- **Contact view tab** — "Deals" tab on contact detail page showing associated deals
- **Global search** — deals searchable from Mautic's top search bar
- **Deal list search** — filter deals by title, stage, status
- **Batch actions** — multi-select deals for stage change or archive
- **Undo toast** — 60-second undo window for destructive batch actions
- **Pipeline velocity reporting** — average days to close, cycle time, monthly close rate
- **Docker test infrastructure** — `make gate` runs PHPUnit, PHPStan, CS Fixer in container
- PHPStan level 6 configuration
- PHP-CS-Fixer with PSR-12/Symfony rules

### Changed
- DealRepository migrated from ServiceEntityRepository to CommonRepository
- DealModel wired with full AbstractCommonModel constructor arguments
- All entity tests updated for FormEntity API (camelCase change tracking)

### Fixed
- 3 service wiring bugs causing 500 errors on cache rebuild
- DateTimeImmutable crash in `isChanged()` for `setExpectedCloseDate()`
- InputBag/ParameterBag compatibility for Symfony 6+
- `wrapInTransaction` mock target in tests

## [0.7.0] - 2026-03-15

### Added
- **FormEntity migration** — Deal, Pipeline, DealStage now extend Mautic's FormEntity
- **DealModel** — thin FormModel subclass for campaign integration
- **Campaign condition** — "Contact has matching Deal Flow deal"
- **Campaign action** — "Move Deal Flow deal to stage"
- **Segment filters** — pipeline, stage, status, stakeholder role, amount
- Dashboard widget config popovers

### Changed
- Entity timestamps: `createdAt` → `dateAdded`, `updatedAt` → `dateModified`
- Pipeline/DealStage: `isActive` → `isPublished`
- Deal gained `isPublished` toggle

## [0.6.4] - 2026-03-15

### Added
- Deal.qualification field
- DealNote.activityType field
- InboundWebhookSource.fieldMapping field
- Database migration for new fields
- 219 characterization tests

### Fixed
- `isChanged()` calls: camelCase only, removed DateTimeImmutable/relationship calls
- DealManager flush consolidation

## [0.6.3] - 2026-03-14

### Fixed
- Missing `isChanged()` calls across 9 entities
- DealManager flush consolidation for batch operations

## [0.6.2] - 2026-03-13

### Added
- 8 dashboard widgets: stage breakdown, pipeline value, won/lost, closing this month, owner leaderboard, stale deals, weighted forecast, overdue tasks
- Revenue Over Time widget with weekly/cumulative toggle
- Clickable links on all dashboard widgets
- Config screen for plugin settings
- 36 unit tests

## [0.6.0] - 2026-03-12

### Added
- AJAX kanban board for pipeline view
- Health indicator dots on deal cards
- Deal list pagination
- XSS protection fixes
- Deal field builder UX improvements

## [0.5.0] - 2026-03-10

### Added
- Per-source inbound webhook credentials with HMAC signing
- API documentation views
- Company deals sidebar on company view
- Deal attachment API
- Modal new deal flow

## [0.1.0] - 2026-03-08

### Added
- Initial Deal Flow plugin for Mautic 7
- 10 entities: Deal, DealStage, Pipeline, DealNote, DealTask, DealContactAssociation, DealAttachment, DealAuditEvent, DealField, InboundWebhookSource
- Pipeline and stage management
- Deal CRUD with form builder
- REST API for deals
- Permission system (view/edit/create/delete own/other)
