wulf-pulse/lib/types
lorentz dd4cf68def feat: add project_phases entity sync with task project_id backfill
The Autotask Tasks bulk API does not return projectID in its response,
causing all tasks.project_id to be NULL. This fixes it by:

- Adding project_phases as a synced entity (Autotask endpoint: /Phases)
- Migration 059: project_phases table with project_id, phase_number,
  estimated_hours, start/due dates, parent_phase_id, is_scheduled
- EntityType.PROJECT_PHASES added to all sync maps and dependency graph
  (depends on PROJECTS, runs before TASKS in sync order)
- buildProjectPhasesFilter: Phases endpoint requires a filter (id > 0)
- mapProjectPhase: maps Autotask field names to DB columns
- Post-sync backfill in syncEntity: after each project_phases sync,
  UPDATE tasks SET project_id = pp.project_id FROM project_phases pp
  JOIN projects p WHERE tasks.phase_id = pp.id
  Only backfills where the project exists in our DB (FK constraint on
  tasks.project_id; archived projects are skipped gracefully)

Result: 2,455 of 4,966 tasks now have project_id populated. Tasks
belonging to archived/completed projects have phase_id resolvable via
project_phases even when project_id remains NULL.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 13:57:33 -04:00
..
addigy.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
analytics.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
autotask.ts feat: add Autotask tags sync (tag groups, tags, ticket tag associations) 2026-03-20 09:22:40 -04:00
auvik.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
database.ts feat: Autotask webhook integration, TicketNotes, Datto RMM, workflow engine, Veeam agents/alarms, AI triage, misc improvements 2026-02-20 10:28:15 -05:00
datto-rmm.ts feat: Autotask webhook integration, TicketNotes, Datto RMM, workflow engine, Veeam agents/alarms, AI triage, misc improvements 2026-02-20 10:28:15 -05:00
errors.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
pipeline.ts feat: IT Glue integration, workflow engine, pipelines, Zabbix WAN, notification channels, backup status UI improvements, nav alignment fixes 2026-02-27 14:52:14 -05:00
qbo.ts feat: QuickBooks Online integration 2026-03-17 07:39:55 -04:00
sync.ts feat: add project_phases entity sync with task project_id backfill 2026-03-24 13:57:33 -04:00
ticket-workflow.ts feat: IT Glue integration, workflow engine, pipelines, Zabbix WAN, notification channels, backup status UI improvements, nav alignment fixes 2026-02-27 14:52:14 -05:00
veeam.ts feat: Autotask webhook integration, TicketNotes, Datto RMM, workflow engine, Veeam agents/alarms, AI triage, misc improvements 2026-02-20 10:28:15 -05:00
webhook.ts feat: QuickBooks Online integration 2026-03-17 07:39:55 -04:00
workflow.ts feat: Autotask webhook integration, TicketNotes, Datto RMM, workflow engine, Veeam agents/alarms, AI triage, misc improvements 2026-02-20 10:28:15 -05:00
zabbix.ts feat: Morning NOC Summary adaptive card for Teams 2026-03-11 09:34:51 -04:00