Skip to content

Jira issues - Fix missing filter query params not sent to backend

What does this MR do and why?

  • Change "projects[]" param to "project" (previous MR !145377 (merged)):
    • Change in implementation since we will only allow filtering by a single project at a time. The projects[] syntax with multiple values also wasn't consistent with labels as labels[] implied an AND query while projects (if supported) would always be an OR query.
    • This change is behind a feature flag jira_multiple_project_keys.
  • Fix missing filter query params:

Changelog: fixed

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

Frontend URL query param Backend request
project=KEY project: KEY
status=To+Do status: To Do
assignee_username=Justin+Ho+Tuan+Duong assignee_username: Justin Ho Tuan Duong
author_username=Justin+Ho+Tuan+Duong author_username: Justin Ho Tuan Duong

For example, http://127.0.0.1:3000/gitlab-org/gitlab-test/-/integrations/jira/issues?project=FE&status=To+Do&author_username=Justin+Ho+Tuan+Duong&assignee_username=Justin+Ho+Tuan+Duong.

Screenshot_2024-03-07_at_16.34.32

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 project=KEY in the URL (http://127.0.0.1:3000/gitlab-org/gitlab-test/-/integrations/jira/issues?project=KEY).
  4. View the Inspect > Network tab in your browser and search for issues.json request. Make sure it includes the param project=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. Repeat 3-4 for all the query params listed above.
  6. Play around with pagination, sort, label, search to make sure URL and issues.json request includes correct params.

Related to #442692 (closed)

Merge request reports