Commit 6b409e4d authored by Vitali Tatarintev's avatar Vitali Tatarintev

Merge branch '254903-add-multiple-assignee-filter-graphql' into 'master'

Add assignee usernames to issue resolver

Closes #254903

See merge request gitlab-org/gitlab!43294
parents 47b68e87 fc4cf4e2
......@@ -24,6 +24,9 @@ module IssueResolverArguments
argument :assignee_username, GraphQL::STRING_TYPE,
required: false,
description: 'Username of a user assigned to the issue'
argument :assignee_usernames, [GraphQL::STRING_TYPE],
required: false,
description: 'Usernames of users assigned to the issue'
argument :assignee_id, GraphQL::STRING_TYPE,
required: false,
description: 'ID of a user assigned to the issues, "none" and "any" values supported'
......
---
title: Add assignee usernames to issue resolver
merge_request: 43294
author:
type: changed
......@@ -7363,6 +7363,11 @@ type Group {
"""
assigneeUsername: String
"""
Usernames of users assigned to the issue
"""
assigneeUsernames: [String!]
"""
Username of the author of the issue
"""
......@@ -12930,6 +12935,11 @@ type Project {
"""
assigneeUsername: String
"""
Usernames of users assigned to the issue
"""
assigneeUsernames: [String!]
"""
Username of the author of the issue
"""
......@@ -13025,6 +13035,11 @@ type Project {
"""
assigneeUsername: String
"""
Usernames of users assigned to the issue
"""
assigneeUsernames: [String!]
"""
Username of the author of the issue
"""
......@@ -13110,6 +13125,11 @@ type Project {
"""
assigneeUsername: String
"""
Usernames of users assigned to the issue
"""
assigneeUsernames: [String!]
"""
Username of the author of the issue
"""
......
......@@ -20370,6 +20370,24 @@
},
"defaultValue": null
},
{
"name": "assigneeUsernames",
"description": "Usernames of users assigned to the issue",
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
},
"defaultValue": null
},
{
"name": "assigneeId",
"description": "ID of a user assigned to the issues, \"none\" and \"any\" values supported",
......@@ -38127,6 +38145,24 @@
},
"defaultValue": null
},
{
"name": "assigneeUsernames",
"description": "Usernames of users assigned to the issue",
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
},
"defaultValue": null
},
{
"name": "assigneeId",
"description": "ID of a user assigned to the issues, \"none\" and \"any\" values supported",
......@@ -38348,6 +38384,24 @@
},
"defaultValue": null
},
{
"name": "assigneeUsernames",
"description": "Usernames of users assigned to the issue",
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
},
"defaultValue": null
},
{
"name": "assigneeId",
"description": "ID of a user assigned to the issues, \"none\" and \"any\" values supported",
......@@ -38535,6 +38589,24 @@
},
"defaultValue": null
},
{
"name": "assigneeUsernames",
"description": "Usernames of users assigned to the issue",
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
},
"defaultValue": null
},
{
"name": "assigneeId",
"description": "ID of a user assigned to the issues, \"none\" and \"any\" values supported",
......@@ -46,6 +46,13 @@ RSpec.describe Resolvers::IssuesResolver do
expect(resolve_issues(assignee_username: assignee.username)).to contain_exactly(issue2)
end
it 'filters by two assignees' do
assignee2 = create(:user)
issue2.update!(assignees: [assignee, assignee2])
expect(resolve_issues(assignee_id: [assignee.id, assignee2.id])).to contain_exactly(issue2)
end
it 'filters by assignee_id' do
expect(resolve_issues(assignee_id: assignee.id)).to contain_exactly(issue2)
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