fixed 工作项加到项目时project_issues_index重排序号
This commit is contained in:
		
							parent
							
								
									656fb9a2a6
								
							
						
					
					
						commit
						cd32a3ab6c
					
				| 
						 | 
				
			
			@ -85,6 +85,10 @@ class Api::V1::Issues::UpdateService < ApplicationService
 | 
			
		|||
      @updated_issue.root_id = @root_id unless @root_id.nil? #不为 nil的时候更新
 | 
			
		||||
      @updated_issue.root_id = nil if @root_id.try(:zero?) #为 0 的时候设置为 nil
 | 
			
		||||
      @updated_issue.time_scale = @time_scale unless @time_scale.nil?
 | 
			
		||||
      if @project_id.present? && @project_id.to_i == 0
 | 
			
		||||
        add_project = Project.find_by(id: @project_id)
 | 
			
		||||
        @updated_issue.project_issues_index = add_project.get_last_project_issues_index + 1 if add_project.present?
 | 
			
		||||
      end
 | 
			
		||||
      @updated_issue.project_id = @project_id unless @project_id.nil?
 | 
			
		||||
      @updated_issue.updated_on = Time.now
 | 
			
		||||
      @updated_issue.changer_id = @current_user.id
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue