From 46873a77cd29506c8b97bfe2d3735c29293fb0a6 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Tue, 25 Mar 2025 16:13:06 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E5=B7=A5=E4=BD=9C=E9=A1=B9=E5=8A=A0?= =?UTF-8?q?=E5=88=B0=E9=A1=B9=E7=9B=AE=E6=97=B6project=5Fissues=5Findex?= =?UTF-8?q?=E9=87=8D=E6=8E=92=E5=BA=8F=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index b0133eec7..446cb89ac 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -453,7 +453,7 @@ class Project < ApplicationRecord end def get_last_project_issues_index - last_issue = self.issues.issue_issue.last + last_issue = self.issues.issue_issue.order(project_issues_index: :asc).last deleted_issue_count = ($redis_cache.hget("issue_cache_delete_count", self.id) || 0).to_i last_issue&.project_issues_index.present? ? last_issue.project_issues_index + deleted_issue_count : 0