From 354242a290e1e8d46ff0d22b4a515d08e5950752 Mon Sep 17 00:00:00 2001 From: yystopf Date: Thu, 18 Jan 2024 09:58:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/issue.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 6904aaf46..26c170e56 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -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