Browse Source

修复

pull/347/head
yystopf 2 years ago
parent
commit
354242a290
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      app/models/issue.rb

+ 7
- 7
app/models/issue.rb View File

@@ -107,7 +107,7 @@ class Issue < ApplicationRecord
end

def incre_or_decre_closed_issues_count
if previous_changes[:status_id].present? && is_issuely_issue
if previous_changes[:status_id].present? && is_issuely_issue?
if previous_changes[:status_id][1] == 5
CacheAsyncSetJob.perform_later("project_common_service", {closed_issues: 1}, self.project_id)
end
@@ -118,27 +118,27 @@ class Issue < ApplicationRecord
end

def incre_project_common
CacheAsyncSetJob.perform_later("project_common_service", {issues: 1}, self.project_id) if is_issuely_issue
CacheAsyncSetJob.perform_later("project_common_service", {issues: 1}, self.project_id) if is_issuely_issue?
end

def decre_project_common
CacheAsyncSetJob.perform_later("project_common_service", {issues: -1}, self.project_id) if is_issuely_issue
CacheAsyncSetJob.perform_later("project_common_service", {issues: -1}, self.project_id) if is_issuely_issue?
end

def incre_user_statistic
CacheAsyncSetJob.perform_later("user_statistic_service", {issue_count: 1}, self.author_id) if is_issuely_issue
CacheAsyncSetJob.perform_later("user_statistic_service", {issue_count: 1}, self.author_id) if is_issuely_issue?
end

def decre_user_statistic
CacheAsyncSetJob.perform_later("user_statistic_service", {issue_count: -1}, self.author_id) if is_issuely_issue
CacheAsyncSetJob.perform_later("user_statistic_service", {issue_count: -1}, self.author_id) if is_issuely_issue?
end

def incre_platform_statistic
CacheAsyncSetJob.perform_later("platform_statistic_service", {issue_count: 1}) if is_issuely_issue
CacheAsyncSetJob.perform_later("platform_statistic_service", {issue_count: 1}) if is_issuely_issue?
end

def decre_platform_statistic
CacheAsyncSetJob.perform_later("platform_statistic_service", {issue_count: -1}) if is_issuely_issue
CacheAsyncSetJob.perform_later("platform_statistic_service", {issue_count: -1}) if is_issuely_issue?
end

def get_assign_user


Loading…
Cancel
Save