|
|
|
@@ -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') |
|
|
|
|