fix: issues select count

This commit is contained in:
yystopf 2022-01-24 10:00:44 +08:00
parent 655c85851f
commit e14936e820
1 changed files with 2 additions and 2 deletions

View File

@ -27,11 +27,11 @@ class IssuesController < ApplicationController
@filter_issues = @filter_issues.where("subject LIKE ? OR description LIKE ? ", "%#{params[:search]}%", "%#{params[:search]}%") if params[:search].present?
@open_issues = @all_issues.where.not(status_id: IssueStatus::CLOSED)
@close_issues = @all_issues.where(status_id: IssueStatus::CLOSED)
@assign_to_me = @filter_issues.where(assigned_to_id: current_user&.id)
@my_published = @filter_issues.where(author_id: current_user&.id)
scopes = Issues::ListQueryService.call(issues,params.delete_if{|k,v| v.blank?}, "Issue")
@issues_size = scopes.size
@issues = paginate(scopes)
@assign_to_me = @issues.where(assigned_to_id: current_user&.id)
@my_published = @issues.where(author_id: current_user&.id)
respond_to do |format|
format.json