rename
This commit is contained in:
parent
3fa3f3a7cc
commit
a572554102
|
@ -99,7 +99,7 @@ class Issue < ApplicationRecord
|
|||
scope :closed, ->{where(status_id: 5)}
|
||||
scope :opened, ->{where.not(status_id: 5)}
|
||||
after_create :incre_project_common, :incre_user_statistic, :incre_platform_statistic
|
||||
after_save :change_versions_count, :send_update_message_to_notice_system, :associate_attachment_container, :fresh_root_issue_count
|
||||
after_save :change_versions_count, :send_update_message_to_notice_system, :associate_attachment_container, :refresh_root_issue_count
|
||||
after_destroy :update_closed_issues_count_in_project!, :decre_project_common, :decre_user_statistic, :decre_platform_statistic
|
||||
|
||||
def incre_project_common
|
||||
|
@ -118,7 +118,7 @@ class Issue < ApplicationRecord
|
|||
CacheAsyncSetJob.perform_later('user_statistic_service', {issue_count: -1}, self.author_id)
|
||||
end
|
||||
|
||||
def fresh_root_issue_count
|
||||
def refresh_root_issue_count
|
||||
return if root_id.nil? || root_id.zero?
|
||||
root_issue = Issue.find_by(id: root_id)
|
||||
root_count = Issue.where(root_id: root_id).count
|
||||
|
|
Loading…
Reference in New Issue