fixed issues_count统计不包含周报

This commit is contained in:
xxq250 2024-05-20 08:46:33 +08:00
parent 785869d48a
commit 6f25498c29
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class Api::Pm::ProjectsController < Api::Pm::BaseController
end
@participant_category_count = {}
if params[:participant_category].to_s == "authoredme" or params[:participant_category].to_s == "assignedme"
issues_category = @issues.joins(:issue_participants).where(issue_participants: {participant_type: %w[authored assigned atme], participant_id: current_user&.id})
issues_category = @issues.joins(:issue_participants).where(pm_issue_type: [1, 2, 3]).where(issue_participants: {participant_type: %w[authored assigned atme], participant_id: current_user&.id})
@participant_category_count = issues_category.group(:pm_project_id, "issue_participants.participant_type").count
end
case params[:participant_category].to_s