Requirements filter by author username or search
What does this MR do?
Add filter by author username
and title
search.
Database query (sort + search)
SELECT "requirements".* FROM "requirements" WHERE "requirements"."project_id" = 27 AND "requirements"."author_id" = 1 AND "requirements"."title" ILIKE '%make%' AND "requirements"."title" ILIKE '%more%' AND "requirements"."title" ILIKE '%betterer%' ORDER BY "requirements"."created_at" DESC, "requirements"."id" DESC LIMIT 100
Query plan (https://explain.depesz.com/s/DVQS):
Limit (cost=2.18..2.19 rows=1 width=590)
-> Sort (cost=2.18..2.19 rows=1 width=590)
Sort Key: created_at DESC, id DESC
-> Index Scan using index_requirements_on_project_id_and_iid on requirements (cost=0.14..2.17 rows=1 width=590)
Index Cond: (project_id = 27)
Filter: (((title)::text ~~* '%make%'::text) AND ((title)::text ~~* '%more%'::text) AND ((title)::text ~~* '%betterer%'::text) AND (author_id = 1))
GraphQL query:
query {
project(fullPath: "group/project_path") {
requirements(authorUsername: "root", sort: created_desc, search: "make it more betterer") {
edges {
node {
id
title
state
}
}
}
}
}
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related to #212543 (closed)
Edited by Justin Farris