This commit is contained in:
sylor_huang@126.com 2020-07-17 11:27:43 +08:00
parent 9372fcf6a4
commit 49db7cf68d
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
class ChangeVersionsIssuesCount < ActiveRecord::Migration[5.2]
def change
versions = Version.includes(:issues).select(:id, :closed_issues_count, :percent)
versions = Version.includes(:issues).select(:id, :closed_issues_count, :percent,:issues_count)
versions.each do |v|
closed_issues = Issue.select(:id, :fixed_version_id, :status_id).where(fixed_version_id: v.id, status_id: 5).size
unless v.closed_issues_count.to_i == closed_issues