issue回复添加到积分统计
This commit is contained in:
parent
286418b63c
commit
01e8730b25
|
@ -219,15 +219,15 @@ class Journal < ActiveRecord::Base
|
||||||
def decrease_issues_journal_count
|
def decrease_issues_journal_count
|
||||||
unless self.issue.project.nil?
|
unless self.issue.project.nil?
|
||||||
project = self.issue.project
|
project = self.issue.project
|
||||||
project.update_attribute(:journals_count, project.journals_count - 1)
|
project.project_score.update_attribute(:issue_journal_num, project.project_score.issue_journal_num - 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# issue留言总数更新
|
# issue留言总数更新
|
||||||
def add_journals_count
|
def add_journals_count
|
||||||
if !self.issue.project.nil? && self.journalized_type == "Issue" && self.issue.project.project_score.nil?
|
if !self.issue.project.nil? && self.journalized_type == "Issue" && !self.issue.project.project_score.nil?
|
||||||
project = self.issue.project
|
project = self.issue.project
|
||||||
project.project_score.update_attribute(:issue_journal_num, project.project_score.journals_count + 1)
|
project.project_score.update_attribute(:issue_journal_num, project.project_score.issue_journal_num + 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue