Skip to content

Draft: POC add group-level issues

Jan Provaznik requested to merge poc-issues_to_groups into if-poc-epics_to_projects

References: #338819 (closed)

What does this MR do?

Related to consolidate groups and projects architecture blueprint and complementary epics on projects POC.

In this MR:

  • issues are associated with project's ProjectNamespace (in future we can deprecate issue's project_id reference and rely on project namespace reference only)
  • issues can be created either in group or in project
  • updates IssuesFinder to use only namespace hiearchy to find issues for a group (and its sub-groups and sub-projects)
  • listing of group issues in REST API returns both project_id or group_id attributes

The scope of the POC for now is very limited, same as for epics on project POC:

  • create a group-level issue from console
  • list issues in REST API

How to test/try:

  • Enable use_traversal_ids FF
  • Use console to create a group issue:
Issue.create!(title: 'group issue', author: u, namespace: group)
[6] pry(main)> is.attributes
=> {"id"=>592,
 "title"=>"group issue",
 "author_id"=>1,
 "project_id"=>nil,
...
 "namespace_id"=>28}
  • List issues:
curl --header "PRIVATE-TOKEN: <TOKEN>" http://localhost:3000/api/v4/groups/28/issues|jq .
...
 }, {
    "id": 592,
    "iid": 5,
    "project_id": null,
    "title": "group issue",
    "description": null,
    "state": "opened",
    "created_at": "2021-07-12T13:54:29.576Z",
    "updated_at": "2021-07-12T13:54:29.576Z",
    "group_id": 28,
    ...
  }, {

Screenshots or Screencasts (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Gabe Weaver

Merge request reports