This instance will be upgraded to Heptapod 0.31.0rc on 2022-05-19 at 11:00 UTC+2 (a few minutes of down time)

Commit c2c16309 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge branch 'fix/groupsearch' into 'master'

Fix group search to check path as well as name

The API documentation says:

"You can search for groups by name or path with: /groups?search=Rails"

But you can't because the search query only checks the name, not the path. This fixes that.

See merge request !325
...@@ -91,7 +91,7 @@ def system_hook_service ...@@ -91,7 +91,7 @@ def system_hook_service
class << self class << self
def search(query) def search(query)
where("LOWER(namespaces.name) LIKE :query", query: "%#{query.downcase}%") where("LOWER(namespaces.name) LIKE :query or LOWER(namespaces.path) LIKE :query", query: "%#{query.downcase}%")
end end
def sort(method) def sort(method)
......
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