fix: activity issues must only issue

This commit is contained in:
yystopf 2022-03-10 09:51:46 +08:00
parent ef12f85687
commit b1c03ed5e8
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ class Users::StatisticsController < Users::BaseController
@commit_data = []
date_range.each do |date|
@date_data << date.strftime("%Y.%m.%d")
@issue_data << observed_user.issues.where("DATE(created_on) = ?", date).size
@issue_data << observed_user.issues.issue_issue.where("DATE(created_on) = ?", date).size
@pull_request_data << observed_user.pull_requests.where("DATE(created_at) = ?", date).size
date_commit_data = commit_data.blank? ? nil : commit_data.select{|item| item["timestamp"] == date.to_time.to_i}
@commit_data << (date_commit_data.blank? ? 0 : date_commit_data[0]["contributions"].to_i)