From 3038f3bfb9b08fb40eb213cc31c6bc1676398ad5 Mon Sep 17 00:00:00 2001 From: yystopf Date: Tue, 27 May 2025 14:45:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=EF=BC=9A=E5=B1=95=E7=A4=BAis?= =?UTF-8?q?sue=E4=BB=85=E5=8C=85=E6=8B=AC=E6=88=91=E8=B4=9F=E8=B4=A3?= =?UTF-8?q?=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/pm/weekly_issues_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/pm/weekly_issues_controller.rb b/app/controllers/api/pm/weekly_issues_controller.rb index 8f7b0b8b6..dac4d65d3 100644 --- a/app/controllers/api/pm/weekly_issues_controller.rb +++ b/app/controllers/api/pm/weekly_issues_controller.rb @@ -3,7 +3,7 @@ class Api::Pm::WeeklyIssuesController < Api::Pm::BaseController def personal @enterprise_identifier = params[:enterprise_identifier] || '' return render_error('请输入正确的用户ID.') if params[:user_id].blank? - @all_issues = Issue.joins(:issue_participants).where(issue_participants: {participant_id: params[:user_id], participant_type: ['authored', 'assigned']}) + @all_issues = Issue.joins(:issue_participants).where(issue_participants: {participant_id: params[:user_id], participant_type: ['assigned']}) @all_issues = @all_issues.where(enterprise_identifier: @enterprise_identifier, pm_issue_type: [1,2,3]) @this_week_all_issues = @all_issues.where("due_date >= ? and start_date <= ?", Date.today.beginning_of_week.to_s, Date.today.end_of_week.to_s).distinct @this_week_all_issues = @this_week_all_issues.order('created_on desc') @@ -65,7 +65,7 @@ class Api::Pm::WeeklyIssuesController < Api::Pm::BaseController def personal_issues @enterprise_identifier = params[:enterprise_identifier] || '' return render_error('请输入正确的用户ID.') if params[:user_id].blank? - @all_issues = Issue.joins(:issue_participants).where(issue_participants: {participant_id: params[:user_id], participant_type: ['authored', 'assigned']}) + @all_issues = Issue.joins(:issue_participants).where(issue_participants: {participant_id: params[:user_id], participant_type: ['assigned']}) @all_issues = @all_issues.where(enterprise_identifier: @enterprise_identifier, pm_issue_type: [1,2,3]) @this_week_all_issues = @all_issues.where("due_date >= ? and start_date <= ?", Date.today.beginning_of_week.to_s, Date.today.end_of_week.to_s).distinct @this_week_all_issues = @this_week_all_issues.order('created_on desc')