Delegate reading `notes` 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:
- On the Epic: UNION query for
notes.noteable_id = epics.issue_id AND noteable_type = 'Issue'
- On the WorkItem: UNION query for
notes.noteable_id = epics.id AND noteable_type = 'Epic' JOIN epics ON epics.issue_id = issues.id
Edited by Nicolas Dular