Browse Source

fixed 工作项加到项目时project_issues_index重排序号

pull/348/head
xxq250 1 year ago
parent
commit
46873a77cd
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/models/project.rb

+ 1
- 1
app/models/project.rb View File

@@ -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


Loading…
Cancel
Save