@@ -43,7 +43,7 class IssueStatus < ActiveRecord::Base | |||||
43 | # Update all the +Issues+ setting their done_ratio to the value of their +IssueStatus+ |
|
43 | # Update all the +Issues+ setting their done_ratio to the value of their +IssueStatus+ | |
44 | def self.update_issue_done_ratios |
|
44 | def self.update_issue_done_ratios | |
45 | if Issue.use_status_for_done_ratio? |
|
45 | if Issue.use_status_for_done_ratio? | |
46 |
IssueStatus.where("default_done_ratio >= 0"). |
|
46 | IssueStatus.where("default_done_ratio >= 0").each do |status| | |
47 | Issue.where({:status_id => status.id}).update_all({:done_ratio => status.default_done_ratio}) |
|
47 | Issue.where({:status_id => status.id}).update_all({:done_ratio => status.default_done_ratio}) | |
48 | end |
|
48 | end | |
49 | end |
|
49 | end |
General Comments 0
You need to be logged in to leave comments.
Login now