diff --git a/app/assets/javascripts/issues/list/components/empty_state_without_any_issues.vue b/app/assets/javascripts/issues/list/components/empty_state_without_any_issues.vue index 3f29fc66abb906298410650d9ca7a93abb61779b..9f7fca0ceca3c23bd7afc8640ad6f07d0165a474 100644 --- a/app/assets/javascripts/issues/list/components/empty_state_without_any_issues.vue +++ b/app/assets/javascripts/issues/list/components/empty_state_without_any_issues.vue @@ -28,6 +28,7 @@ export default { 'newProjectPath', 'showNewIssueLink', 'signInPath', + 'groupId', ], props: { currentTabCount: { @@ -95,6 +96,7 @@ export default { :query="$options.searchProjectsQuery" :query-variables="newIssueDropdownQueryVariables" :extract-projects="extractProjects" + :group-id="groupId" /> </template> </gl-empty-state> diff --git a/app/assets/javascripts/issues/list/components/issues_list_app.vue b/app/assets/javascripts/issues/list/components/issues_list_app.vue index 35ef5c147839bcfa1d4b706ed03daba6ceaa5f01..f7693dd7102b8ef551b368d9e5de9dd2d1d0777d 100644 --- a/app/assets/javascripts/issues/list/components/issues_list_app.vue +++ b/app/assets/javascripts/issues/list/components/issues_list_app.vue @@ -166,6 +166,7 @@ export default { 'releasesPath', 'rssPath', 'showNewIssueLink', + 'groupId', ], props: { eeSearchTokens: { @@ -895,6 +896,7 @@ export default { :query="$options.searchProjectsQuery" :query-variables="newIssueDropdownQueryVariables" :extract-projects="extractProjects" + :group-id="groupId" /> <gl-disclosure-dropdown v-gl-tooltip.hover="$options.i18n.actionsLabel" diff --git a/app/assets/javascripts/issues/list/index.js b/app/assets/javascripts/issues/list/index.js index a97b59c1e4f58ddaf7e3fe8cf66c1f579e8d0d55..d1b4529402608c975cc6beef2deabcdeb40c0171 100644 --- a/app/assets/javascripts/issues/list/index.js +++ b/app/assets/javascripts/issues/list/index.js @@ -94,6 +94,7 @@ export async function mountIssuesListApp() { rssPath, showNewIssueLink, signInPath, + groupId = '', } = el.dataset; return new Vue({ @@ -153,6 +154,7 @@ export async function mountIssuesListApp() { markdownHelpPath, quickActionsHelpPath, resetPath, + groupId, }, render: (createComponent) => createComponent(IssuesListApp), }); diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 341c50abf84dea7725b42435f44af17d62627154..5da7795673c72448c4dcbe3a8227a24262ed1d38 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -231,7 +231,8 @@ def group_issues_list_data(group, current_user) can_read_crm_organization: can?(current_user, :read_crm_organization, group).to_s, has_any_issues: @has_issues.to_s, has_any_projects: @has_projects.to_s, - new_project_path: new_project_path(namespace_id: group.id) + new_project_path: new_project_path(namespace_id: group.id), + group_id: group.id ) end diff --git a/ee/spec/frontend/issues/list/components/issues_list_app_spec.js b/ee/spec/frontend/issues/list/components/issues_list_app_spec.js index e57b40f11b63d54a1cf9a1152075c124e8912311..4ef3cc38059e2400c23c9c9fbc1b3fafa625f80d 100644 --- a/ee/spec/frontend/issues/list/components/issues_list_app_spec.js +++ b/ee/spec/frontend/issues/list/components/issues_list_app_spec.js @@ -77,6 +77,7 @@ describe('EE IssuesListApp component', () => { rssPath: 'rss/path', showNewIssueLink: true, signInPath: 'sign/in/path', + groupId: '', }; const defaultQueryResponse = cloneDeep(getIssuesQueryResponse); diff --git a/spec/frontend/issues/list/components/empty_state_without_any_issues_spec.js b/spec/frontend/issues/list/components/empty_state_without_any_issues_spec.js index a61e7ed1e8621d4b6713c8160c586506a3d9a58b..8e69213ebba6ee49f5ac3d88206d1739db020dea 100644 --- a/spec/frontend/issues/list/components/empty_state_without_any_issues_spec.js +++ b/spec/frontend/issues/list/components/empty_state_without_any_issues_spec.js @@ -23,6 +23,7 @@ describe('EmptyStateWithoutAnyIssues component', () => { newProjectPath: 'new/project/path', showNewIssueLink: false, signInPath: 'sign/in/path', + groupId: '', }; const findCsvImportExportButtons = () => wrapper.findComponent(CsvImportExportButtons); diff --git a/spec/frontend/issues/list/components/issues_list_app_spec.js b/spec/frontend/issues/list/components/issues_list_app_spec.js index 0e87e5e6595ca58df1941172831d413b715b2fa4..72bf48260568d8fa44e5a8b5b31dd3ea8a5a1fd2 100644 --- a/spec/frontend/issues/list/components/issues_list_app_spec.js +++ b/spec/frontend/issues/list/components/issues_list_app_spec.js @@ -115,6 +115,7 @@ describe('CE IssuesListApp component', () => { rssPath: 'rss/path', showNewIssueLink: true, signInPath: 'sign/in/path', + groupId: '', }; let defaultQueryResponse = getIssuesQueryResponse; diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb index 38cbb5a1d66bbd48e8af65cb1951463c54c668ba..ba323140720e6d76ccf16b747a83626c7bd500b9 100644 --- a/spec/helpers/issues_helper_spec.rb +++ b/spec/helpers/issues_helper_spec.rb @@ -364,7 +364,8 @@ jira_integration_path: help_page_url('integration/jira/issues', anchor: 'view-jira-issues'), new_project_path: new_project_path(namespace_id: group.id), rss_path: '#', - sign_in_path: new_user_session_path + sign_in_path: new_user_session_path, + group_id: group.id } expect(helper.group_issues_list_data(group, current_user)).to include(expected)