Backend - Spike on backend tasks needed to support issues on group level

Investigate what are the tasks from backend perspective needed to be able to support work items at group level

High level list of tasks

Phase 1 - Setup

  1. add namespace_id column to issues table
    • Can be worked on as soon as %15.2
  2. Ensure issues#namespace_id is populated when issue is created, updated, moved, etc
    • Can be worked on as soon as %15.2 after namespace_id column is added
  3. backfilling namespace_id column with project_namespace_id
    • Can be worked on as soon as %15.2
  4. Finalize backfilling namespace_id column with project_namespace_id
    • Can be worked on as soon as %15.3
  5. Add not null constraint on issues#namespace_id after backfilling is complete
    • Can be worked on in %15.3 after finalize backfilling namespace_id column is done.

Phase 2 - Prerequisite work

  1. Investigate permission model as well as any performance concerns related to that with issues being available at various hierarchy levels
    • PoC on permission checks may be require or maybe we can make use of FFs or both.
  2. Investigate what other models need to support namespaces before we can have work item at namespace level
    • notes
    • ???
  3. Adjust CRUD service(s) to handle project_id and namespace_id
    • Can/should be broken down into smaller, more specific tasks/issues.
    • Can also partially be started in %15.2 but after 1
  4. Adjust APIs(REST and GraphQL) to handle project_id and namespace_id
    • Ideally should be broken into smaller more specific endpoints.
    • Can also partially be started in %15.2 after 1
  5. Investigate how would finders at subgroup or project level fetch work items from higher level groups.
    • what about confidential issues from higher level groups ?

Phase 3 - MVC

  1. Allow a restricted list of specific work item types at group level, e.g. epics only, so that work items reach parity with existing Plan items.

Phase 4 - Work items at group level

  1. Conceptualise which work items flow up and down the hierarchy and how does that happen under what situations, are there any configurations needed, etc
  2. Investigate any index changes needed on issues table given the usage of namespace_id vs project_id
  3. Investigate bulk update of work items from group level
    • This would require UX involvement as well. Having different work item types from different projects, groups etc in the bulk update list can make it tricky to have bulk update.
  4. issue_search_data would also need namespace_id. This table is also currently partitioned by project_id which complicates things a bit.
Edited by Alexandru Croitor