Skip to content

Search query is added without query parameter name in the service desk issues list.

Summary

In the service desk issues list, when a search query is entered, it is added to the url without the query parameter search breaking the filtered search functionality.

Steps to reproduce

To reproduce locally using GDK, follow these steps:

  1. Enable incoming_email in gitlab.yml and restart the GDK.
  2. Then enable the service desk feature in the project setting (pick any project)
  3. In the rails console, create a mock issue using the author id of the support bot.
User.where(user_type: 1) # this will reveal the author id of the support bot.
Issue.create(:author_id => 45, :project_id => 1, :title => hello) # in my case it was 45.

Go to the service desk page and perform a search by entering some query, for example abc, in the filtered search bar (refer to the attached video)

What is the current bug behavior?

A search query is added to the url without the parameter name search. With abc as the search query, the resulting url is

.../service_desk?scope=all&utf8=%E2%9C%93&state=opened&author_username=support-botabc

What is the expected correct behavior?

.../service_desk?scope=all&utf8=%E2%9C%93&state=opened&author_username=support-bot&search=abc

Relevant logs and/or screenshots

Screen_Recording_2020-08-07_at_4.21.09_PM

Possible fixes

Investigation required. It might have something to do with the use of the hidden, default token (author:@support-bot) in the service desk issues list. In the above example, getSearchQuery() from filtered_search/dropdown_utils.js#L126 is returning author:@support-botabc.