mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
Fix search by ID for project cards [SCI-7564]
This commit is contained in:
parent
08b9ec24f0
commit
c35df9a762
1 changed files with 3 additions and 1 deletions
|
@ -110,7 +110,9 @@ class ProjectsOverviewService
|
|||
def filter_project_records(records)
|
||||
records = records.archived if @view_mode == 'archived'
|
||||
records = records.active if @view_mode == 'active'
|
||||
records = records.where_attributes_like('projects.name', @params[:search]) if @params[:search].present?
|
||||
if @params[:search].present?
|
||||
records = records.where_attributes_like(['projects.name', Project::PREFIXED_ID_SQL], @params[:search])
|
||||
end
|
||||
if @params[:members].present?
|
||||
records = records.joins(:user_assignments).where(user_assignments: { user_id: @params[:members] })
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue