Skip to content

Add `projects[]` to Jira issues params and send to backend

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:

  1. Sign up for a free Jira instance for developers.
  2. Create a Jira project and add a couple of dummy issues.

In GitLab:

  1. 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.
  2. Go to Project > Plan > Jira issues (http://127.0.0.1:3000/gitlab-org/gitlab-test/-/integrations/jira/issues).
  3. Add the filter projects[]=KEY in the URL (http://127.0.0.1:3000/gitlab-org/gitlab-test/-/integrations/jira/issues?projects[]=KEY).
  4. View the Inspect > Network tab in your browser and search for issues.json request. Make sure it includes the param projects[]=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.
  5. 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

Merge request reports