Commit 83ab15e4 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch...

Merge branch '235440-search-query-is-added-without-query-parameter-name-in-the-service-desk-issues-list' into 'master'

Fix missing search query parameter name in service desk issues list.

Closes #235440

See merge request gitlab-org/gitlab!40797
parents 291232eb e78734bd
...@@ -85,6 +85,11 @@ export const conditions = flattenDeep( ...@@ -85,6 +85,11 @@ export const conditions = flattenDeep(
tokenKey: 'assignee', tokenKey: 'assignee',
value: __('Any'), value: __('Any'),
}, },
{
url: 'author_username=support-bot',
tokenKey: 'author',
value: 'support-bot',
},
{ {
url: 'milestone_title=None', url: 'milestone_title=None',
tokenKey: 'milestone', tokenKey: 'milestone',
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
- support_bot_attrs = { service_desk_enabled: @project.service_desk_enabled?, **UserSerializer.new.represent(User.support_bot) }.to_json - support_bot_attrs = { service_desk_enabled: @project.service_desk_enabled?, **UserSerializer.new.represent(User.support_bot) }.to_json
- data_endpoint = "#{expose_path(api_v4_projects_issues_path(id: @project.id))}?author_id=#{User.support_bot.id}" - data_endpoint = "#{expose_path(api_v4_projects_issues_path(id: @project.id))}?author_username=#{User.support_bot.username}"
%div{ class: "js-service-desk-issues service-desk-issues", data: { support_bot: support_bot_attrs, service_desk_meta: service_desk_meta(@project) } } %div{ class: "js-service-desk-issues service-desk-issues", data: { support_bot: support_bot_attrs, service_desk_meta: service_desk_meta(@project) } }
.top-area .top-area
......
---
title: Fix the filtered search bar to work in the service desk issue list
merge_request: 40797
author:
type: fixed
...@@ -109,6 +109,14 @@ RSpec.describe 'Service Desk Issue Tracker', :js do ...@@ -109,6 +109,14 @@ RSpec.describe 'Service Desk Issue Tracker', :js do
find('.input-token .filtered-search').native.send_key(:backspace) find('.input-token .filtered-search').native.send_key(:backspace)
expect(page).to have_selector('.js-visual-token', count: 1) expect(page).to have_selector('.js-visual-token', count: 1)
end end
it 'support bot author token has been properly added' do
within('.filtered-search-token') do
expect(page).to have_selector('.name', count: 1, visible: false)
expect(page).to have_selector('.operator', count: 1, visible: false)
expect(page).to have_selector('.value-container', count: 1, visible: false)
end
end
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment