Draft: POC add group-level issues
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
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) -
I have added/updated documentation, or it's not needed. (Is documentation required?) -
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) -
I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) -
I have tested this MR in all supported browsers, or it's not needed. -
I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.
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