Merge branch 'develop' into standalone_develop
This commit is contained in:
commit
86ef890f8b
|
@ -76,7 +76,7 @@ class Issue < ApplicationRecord
|
||||||
scope :issue_index_includes, ->{includes(:tracker, :priority, :version, :issue_status, :journals,:issue_tags,user: :user_extension)}
|
scope :issue_index_includes, ->{includes(:tracker, :priority, :version, :issue_status, :journals,:issue_tags,user: :user_extension)}
|
||||||
scope :closed, ->{where(status_id: 5)}
|
scope :closed, ->{where(status_id: 5)}
|
||||||
after_create :incre_project_common, :incre_user_statistic, :incre_platform_statistic
|
after_create :incre_project_common, :incre_user_statistic, :incre_platform_statistic
|
||||||
after_save :change_versions_count
|
after_save :change_versions_count, :send_update_message_to_notice_system
|
||||||
after_destroy :update_closed_issues_count_in_project!, :decre_project_common, :decre_user_statistic, :decre_platform_statistic
|
after_destroy :update_closed_issues_count_in_project!, :decre_project_common, :decre_user_statistic, :decre_platform_statistic
|
||||||
|
|
||||||
def incre_project_common
|
def incre_project_common
|
||||||
|
@ -200,4 +200,8 @@ class Issue < ApplicationRecord
|
||||||
self.project.decrement!(:closed_issues_count) if self.status_id == 5
|
self.project.decrement!(:closed_issues_count) if self.status_id == 5
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def send_update_message_to_notice_system
|
||||||
|
SendTemplateMessageJob.perform_later('IssueExpire', self.id) if Site.has_notice_menu? && self.due_date == Date.today + 1.days
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue