Add unification for epic and epic work item events
What does this MR do and why?
events unification for epic and epic work item
SQLs
As part of epic sync to work item we now also register events with target_type='WorkItem'.
gitlabhq_dblab=# select * from events where target_type = 'WorkItem' and group_id is not null and project_id is null limit 1;
project_id | author_id | created_at | updated_at | action | target_type | group_id | fingerprint | id | target_id | imported_from
------------+-----------+-------------------------------+-------------------------------+--------+-------------+----------+-------------+------------+-----------+---------------
| 8110537 | 2023-07-28 15:54:13.995145+00 | 2023-07-28 15:54:13.995145+00 | 1 | WorkItem | 9970 | | 2744978990 | 131466254 | 0
(1 row)
No group level events for 'Issue' target
gitlabhq_dblab=# select * from events where target_type = 'Issue' and group_id is not null and project_id is null limit 1;
project_id | author_id | created_at | updated_at | action | target_type | group_id | fingerprint | id | target_id | imported_from
------------+-----------+------------+------------+--------+-------------+----------+-------------+----+-----------+---------------
(0 rows)
The SQL for filtering out events related to epics has slightly changed so that instead of just filtering events with target_type = 'Epic' we now also look for events with type 'WorkItem'.
- Original SQL that filtered out only
Epic
events: - SQL with
OR
: - SQL with
IN
:
Chose the IN
option.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Edited by Alexandru Croitor