Skip to content

Delegate reading `events` for synced work item epics

We need to be able to UNION query this data for the legacy epics and new work items. This means that we need to query:

  1. On the Epic: UNION query for events.target_id = epics.issue_id AND target_type = 'WorkItem'
  2. On the WorkItem: UNION query for events.target_id = epics.id AND target_type = 'Epic' JOIN epics ON epics.issue_id = issues.id
Edited by Nicolas Dular