Skip to content

EE Backport of issue list Vue component

Constance Okoghenun requested to merge ee-57402-issues-list-vue-component into master

What does this MR do?

This MR creates a Vue component to render issues list. The component will render a list of issues for a project, group or user dashboard. It will fetch relevant issues data from the Issues API applying the correct filters either from the issues search bar or URL parameters in the issues page.

It is behind a feature toggle and is not enabled for any of the current issues list views. In subsequent MR's it will be enabled for Project, Groups, and Dashboard Issues lists.

You can find the CE version of this MR here: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29449

How to run locally on your GDK

The guide is to enable rendering of this component for group issues

  • Make the following change to app/views/groups/issues.html.haml
-  = render 'shared/issues'
+ %div{ id: 'js-issues-list', data: { endpoint: expose_url(api_v4_groups_issues_path(id: @group.id)), 'can-update': @can_bulk_update.to_json, 'create-path': '' } } 
  • Make the following change to app/assets/javascripts/pages/dashboard/issues/index.js
+import initIssuesList from '~/issues';
import projectSelect from '~/project_select';
import initFilteredSearch from '~/pages/search/init_filtered_search';
import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys';
import { FILTERED_SEARCH } from '~/pages/constants';

document.addEventListener('DOMContentLoaded', () => {
-  initFilteredSearch({
-    page: FILTERED_SEARCH.ISSUES,
-    filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys,
-  });
+  if (gon.features.issuesVueComponent) {
+    initIssuesList();
+  } else {
+    initFilteredSearch({
+      page: FILTERED_SEARCH.ISSUES,
+      filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys,
+    });

-  projectSelect();
+    projectSelect();
+  }
});
  • Visit any group issues page on your GDK

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • 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 Coung Ngo

Merge request reports