Commit cac0c464 authored by Jan Provaznik's avatar Jan Provaznik

Add search filter to issue boards resolver

This filter is needed on issue boards page so
we need to support it also when listing board epics.
parent e5de27ea
......@@ -1174,6 +1174,11 @@ input BoardEpicIssueInput {
"""
releaseTag: String
"""
Search query for issue title or description
"""
search: String
"""
Filter by weight
"""
......
......@@ -3144,6 +3144,16 @@
"ofType": null
},
"defaultValue": null
},
{
"name": "search",
"description": "Search query for issue title or description",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
}
],
"interfaces": null,
......@@ -45,6 +45,10 @@ module Types
argument :not, Types::NegatedBoardEpicIssueInputType,
required: false,
description: 'List of negated params. Warning: this argument is experimental and a subject to change in future'
argument :search, GraphQL::STRING_TYPE,
required: false,
description: 'Search query for issue title or description'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......@@ -78,6 +78,13 @@ RSpec.describe Resolvers::BoardGroupings::EpicsResolver do
expect(result).to match_array([epic1])
end
it 'finds only epics for issues matching search param' do
result = resolve_board_epics(
group_board, { issue_filters: { search: issue1.title } })
expect(result).to match_array([epic1])
end
it 'accepts negated issue params' do
expect(Boards::Issues::ListService).to receive(:new).with(
group_board.resource_parent,
......
......@@ -7,7 +7,7 @@ RSpec.describe GitlabSchema.types['BoardEpicIssueInput'] do
it 'exposes negated issue arguments' do
allowed_args = %w(labelName milestoneTitle assigneeUsername authorUsername
releaseTag epicId myReactionEmoji weight not)
releaseTag epicId myReactionEmoji weight not search)
expect(described_class.arguments.keys).to match_array(allowed_args)
expect(described_class.arguments['not'].type).to eq(Types::NegatedBoardEpicIssueInputType)
......
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