Skip to content

Events API target_type=Project params should account for project events with NULL target

Currently, when filtering for target_type=Project in the Events API. It would only return newly created joined, created, left, and expired events.

This was an effect of completing Set `events.target_type` to `project` when crea... (#565786 - closed)

However, it still doesn't return old records where the target_type is set to NULL.

The long term solution for this is to backfill the old records.

But this effort is blocked by a complex change needed to ensure push events' target type is set accordingly:

As a short term / temporary patch, we could update the target_type=Project filter to apply the following condition in the query used:

(target_type IS NULL OR target_type = 'Project') AND action IN (<project_actions>)

Edited by Shane Maglangit