Add `projects[]` to Jira issues params and send to backend
requested to merge 440432-jira-issues-add-filter-params-to-index-page-to-filter-by-project-key into master
What does this MR do and why?
When the param is sent from the URL, we will also include it in the query sent to the client GraphQL resolvers, which in term send this to the backend via REST API params.
Similarly to labels, this can accept multiple values, in case we want to allow filtering by multiple projects at a time.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
No changes to existing UI.
Video of new functionality:
Jira_issues_with_projects_param
How to set up and validate locally
If not you don't have a Jira account / instance:
- Sign up for a free Jira instance for developers.
- Create a Jira project and add a couple of dummy issues.
In GitLab:
- Setup the Jira integration in Project > Settings > Integrations > Jira (
http://127.0.0.1:3000/gitlab-org/gitlab-test/-/settings/integrations/jira/edit
). Make sure you check the Enable Jira issues option in Issues section and use the project key of the Jira project you created above. - Go to Project > Plan > Jira issues (
http://127.0.0.1:3000/gitlab-org/gitlab-test/-/integrations/jira/issues
). - Add the filter
projects[]=KEY
in the URL (http://127.0.0.1:3000/gitlab-org/gitlab-test/-/integrations/jira/issues?projects[]=KEY
). - View the Inspect > Network tab in your browser and search for
issues.json
request. Make sure it includes the paramprojects[]=KEY
.🚧 Note: Since the backend is still WIP, this param will NOT filter properly. This MR only makes sure we make the right request, when the backend is ready it should return the correct results. - Play around with pagination, sort, label, search to make sure URL and
issues.json
request includes correct params.
Related to #440432 (closed)
Edited by Justin Ho Tuan Duong