Commit db0e7c8c authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'cngo-fix-group-issues' into 'master'

Fix group issues list not showing subgroup issues

See merge request gitlab-org/gitlab!81004
parents 470ed4f4 c8b7ed14
......@@ -212,7 +212,7 @@ class GroupsController < Groups::ApplicationController
def issues
return super if !html_request? || Feature.disabled?(:vue_issues_list, group, default_enabled: :yaml)
@has_issues = IssuesFinder.new(current_user, group_id: group.id).execute
@has_issues = IssuesFinder.new(current_user, group_id: group.id, include_subgroups: true).execute
.non_archived
.exists?
......
......@@ -108,6 +108,22 @@ RSpec.describe 'Group issues page' do
end
end
context 'group with no issues', :js do
let!(:group_with_no_issues) { create(:group) }
let!(:subgroup_with_issues) { create(:group, parent: group_with_no_issues) }
let!(:subgroup_project) { create(:project, :public, group: subgroup_with_issues) }
let!(:subgroup_issue) { create(:issue, project: subgroup_project) }
before do
stub_feature_flags(vue_issues_list: true)
visit issues_group_path(group_with_no_issues)
end
it 'shows issues from subgroups on issues list' do
expect(page).to have_text subgroup_issue.title
end
end
context 'projects with issues disabled' do
describe 'issue dropdown' do
let(:user_in_group) { create(:group_member, :maintainer, user: create(:user), group: group ).user }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment